winmm: Remove redundant NULL checks before CoTaskMemFree().

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-07-08 10:12:55 +02:00 committed by Alexandre Julliard
parent 1e662d92ba
commit fb1f42754d
1 changed files with 2 additions and 4 deletions

View File

@ -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