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

This commit is contained in:
Andrew Eikum 2011-10-12 15:10:20 -05:00 committed by Alexandre Julliard
parent ad009330f5
commit f2c33ae17a
1 changed files with 1 additions and 1 deletions

View File

@ -580,8 +580,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev,
This->hw_params = HeapAlloc(GetProcessHeap(), 0,
snd_pcm_hw_params_sizeof());
if(!This->hw_params){
HeapFree(GetProcessHeap(), 0, This);
snd_pcm_close(This->pcm_handle);
HeapFree(GetProcessHeap(), 0, This);
return E_OUTOFMEMORY;
}