aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-16 02:17:51 -0700
committerChris Robinson <[email protected]>2011-09-16 02:17:51 -0700
commitec3b78e52d95752160231bc8eb5ad9647e20b3b9 (patch)
tree4ba139e0189a921945acdb55694ea96fb53e1a3f
parent4e903c84cf69bf82afcc14a5717a3580beda63ce (diff)
Fix a mutex leak in a capture open error path
-rw-r--r--Alc/ALc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index e4842eb5..dde5ce4c 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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;