From b3645df56fa96371c1818f950f380935d8095800 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 19 Aug 2011 02:58:21 -0700 Subject: Delete the mutex if the device fails to open --- Alc/ALc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Alc/ALc.c b/Alc/ALc.c index 95541c8a..541da2a5 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1694,6 +1694,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, if(!DeviceFound) { alcSetError(NULL, ALC_INVALID_VALUE); + DeleteCriticalSection(&device->Mutex); free(device); device = NULL; } @@ -2784,6 +2785,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) { // No suitable output device found alcSetError(NULL, ALC_INVALID_VALUE); + DeleteCriticalSection(&device->Mutex); free(device); device = NULL; } -- cgit v1.2.3