audio: free and assign NULL to global static device pointer

 -free and assign NULL to global static device pointer instead of local
  pointer to avoid free after use issue.

Change-Id: Idfdef719320efcd792c7d2ebd7ec2dfe5d3fbfbd
1 file changed