Fix a mutex leak in a capture open error path

This commit is contained in:
Chris Robinson
2011-09-16 02:17:51 -07:00
parent 4e903c84cf
commit ec3b78e52d
+1
View File
@@ -1639,6 +1639,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
device->Flags |= DEVICE_CHANNELS_REQUEST;
if(DecomposeDevFormat(format, &device->FmtChans, &device->FmtType) == AL_FALSE)
{
DeleteCriticalSection(&device->Mutex);
free(device);
alcSetError(NULL, ALC_INVALID_ENUM);
return NULL;