Commit fc4748ae authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winealsa.drv: Properly allocate and free the WAVEFORMATEX returned by IsFormatSupported.

parent 2692a68c
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){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment