diff options
author | Chris Robinson <[email protected]> | 2011-08-19 02:58:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-19 02:58:21 -0700 |
commit | b3645df56fa96371c1818f950f380935d8095800 (patch) | |
tree | 7bdb3930780a0e820053cf2ac6b8d75b559add47 /Alc | |
parent | 711f0a29ecfca285296e0691fc8032cf0041c964 (diff) |
Delete the mutex if the device fails to open
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |