aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 7398e151..46d6ac27 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -657,9 +657,11 @@ ALCAPI ALCboolean ALCAPIENTRY alcCaptureCloseDevice(ALCdevice *pDevice)
ProcessContext(NULL);
+ ALCdevice_CloseCapture(pDevice);
+
free(pDevice->szDeviceName);
+ pDevice->szDeviceName = NULL;
- ALCdevice_CloseCapture(pDevice);
free(pDevice);
bReturn = ALC_TRUE;