winealsa.drv: Properly allocate and free the WAVEFORMATEX returned by IsFormatSupported.
This commit is contained in:
parent
2692a68ce6
commit
fc4748ae74
|
@ -1,5 +1,5 @@
|
|||
MODULE = winealsa.drv
|
||||
IMPORTS = dxguid uuid winmm user32 advapi32
|
||||
IMPORTS = dxguid uuid winmm ole32 user32 advapi32
|
||||
EXTRALIBS = @ALSALIBS@
|
||||
|
||||
C_SRCS = \
|
||||
|
|
|
@ -271,7 +271,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
|
|||
snd_pcm_close(This->pcm_handle);
|
||||
HeapFree(GetProcessHeap(), 0, This->local_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, This->hw_params);
|
||||
HeapFree(GetProcessHeap(), 0, This->fmt);
|
||||
CoTaskMemFree(This->fmt);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
return ref;
|
||||
|
@ -321,7 +321,7 @@ static WAVEFORMATEX *clone_format(const WAVEFORMATEX *fmt)
|
|||
else
|
||||
size = sizeof(WAVEFORMATEX);
|
||||
|
||||
ret = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
ret = CoTaskMemAlloc(size);
|
||||
if(!ret)
|
||||
return NULL;
|
||||
|
||||
|
@ -850,7 +850,7 @@ exit:
|
|||
HeapFree(GetProcessHeap(), 0, formats);
|
||||
|
||||
if(hr == S_OK || !out){
|
||||
HeapFree(GetProcessHeap(), 0, closest);
|
||||
CoTaskMemFree(closest);
|
||||
if(out)
|
||||
*out = NULL;
|
||||
}else if(closest){
|
||||
|
|
Loading…
Reference in New Issue