winealsa.drv: Remove redundant NULL checks before free (Smatch).

This commit is contained in:
Michael Stefaniuc 2011-10-11 00:03:50 +02:00 committed by Alexandre Julliard
parent 036db280d2
commit d8ca697233
1 changed files with 6 additions and 12 deletions

View File

@ -1043,18 +1043,12 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
exit:
HeapFree(GetProcessHeap(), 0, sw_params);
if(FAILED(hr)){
if(This->local_buffer){
HeapFree(GetProcessHeap(), 0, This->local_buffer);
This->local_buffer = NULL;
}
if(This->fmt){
CoTaskMemFree(This->fmt);
This->fmt = NULL;
}
if(This->vols){
HeapFree(GetProcessHeap(), 0, This->vols);
This->vols = NULL;
}
HeapFree(GetProcessHeap(), 0, This->local_buffer);
This->local_buffer = NULL;
CoTaskMemFree(This->fmt);
This->fmt = NULL;
HeapFree(GetProcessHeap(), 0, This->vols);
This->vols = NULL;
}
LeaveCriticalSection(&This->lock);