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

winealsa.drv: Fix invalid pointer dereference on error path.

parent ad009330
...@@ -580,8 +580,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev, ...@@ -580,8 +580,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev,
This->hw_params = HeapAlloc(GetProcessHeap(), 0, This->hw_params = HeapAlloc(GetProcessHeap(), 0,
snd_pcm_hw_params_sizeof()); snd_pcm_hw_params_sizeof());
if(!This->hw_params){ if(!This->hw_params){
HeapFree(GetProcessHeap(), 0, This);
snd_pcm_close(This->pcm_handle); snd_pcm_close(This->pcm_handle);
HeapFree(GetProcessHeap(), 0, This);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
......
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