aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-19 03:19:19 -0700
committerChris Robinson <[email protected]>2013-05-19 03:19:19 -0700
commitc693e649e67b14d508a08a4a8cde191daa4596b0 (patch)
tree9b4c1afb3e77deff08f3fd15ccb277c20292f842
parent1976d64814e131bbd4a4e7d43659559cc742fb91 (diff)
Fix a potential leak when mmdevapi fails to open
-rw-r--r--Alc/backends/mmdevapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index 2555c7f3..2181f274 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -878,6 +878,9 @@ static ALCenum MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceName
CloseHandle(data->MsgEvent);
data->MsgEvent = NULL;
+ free(data->devid);
+ data->devid = NULL;
+
free(data);
device->ExtraData = NULL;