winmm: Add missing LeaveCriticalSection on error paths (Smatch).

This commit is contained in:
Michael Stefaniuc 2013-01-05 00:22:32 +01:00 committed by Alexandre Julliard
parent 4bdb5b55ec
commit 3b4bb9dcf3

View file

@ -757,12 +757,14 @@ static HRESULT reroute_mapper_device(WINMM_Device *device, BOOL is_out)
hr = IAudioClock_GetFrequency(device->clock, &clock_freq);
if(FAILED(hr)){
WARN("GetFrequency failed: %08x\n", hr);
LeaveCriticalSection(&device->lock);
return hr;
}
hr = IAudioClock_GetPosition(device->clock, &clock_pos, NULL);
if(FAILED(hr)){
WARN("GetPosition failed: %08x\n", hr);
LeaveCriticalSection(&device->lock);
return hr;
}