Commit d8ca6972 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 036db280
...@@ -1043,19 +1043,13 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, ...@@ -1043,19 +1043,13 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface,
exit: exit:
HeapFree(GetProcessHeap(), 0, sw_params); HeapFree(GetProcessHeap(), 0, sw_params);
if(FAILED(hr)){ if(FAILED(hr)){
if(This->local_buffer){
HeapFree(GetProcessHeap(), 0, This->local_buffer); HeapFree(GetProcessHeap(), 0, This->local_buffer);
This->local_buffer = NULL; This->local_buffer = NULL;
}
if(This->fmt){
CoTaskMemFree(This->fmt); CoTaskMemFree(This->fmt);
This->fmt = NULL; This->fmt = NULL;
}
if(This->vols){
HeapFree(GetProcessHeap(), 0, This->vols); HeapFree(GetProcessHeap(), 0, This->vols);
This->vols = NULL; This->vols = NULL;
} }
}
LeaveCriticalSection(&This->lock); LeaveCriticalSection(&This->lock);
......
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