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

winmm: Remove redundant NULL checks before CoTaskMemFree().

parent 1e662d92
......@@ -899,8 +899,7 @@ static MMRESULT WINMM_TryDeviceMapping(WINMM_Device *device, WAVEFORMATEX *fmt,
hr = IAudioClient_IsFormatSupported(device->client,
AUDCLNT_SHAREMODE_SHARED, &target, &closer_fmt);
if(closer_fmt)
CoTaskMemFree(closer_fmt);
CoTaskMemFree(closer_fmt);
if(hr != S_OK)
return WAVERR_BADFORMAT;
......@@ -1119,8 +1118,7 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_OpenInfo *info,
hr = IAudioClient_IsFormatSupported(device->client,
AUDCLNT_SHAREMODE_SHARED, device->orig_fmt, &closer_fmt);
if(closer_fmt)
CoTaskMemFree(closer_fmt);
CoTaskMemFree(closer_fmt);
if((hr == S_FALSE || hr == AUDCLNT_E_UNSUPPORTED_FORMAT) && !(info->flags & WAVE_FORMAT_DIRECT))
ret = WINMM_MapDevice(device, TRUE, is_out);
else
......
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