From 9d4390771034d19feaf23a45341cc58fafaced73 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 31 Oct 2009 13:25:26 -0700 Subject: [PATCH] Properly free the device name --- Alc/ALc.c | 4 +++- Alc/pulseaudio.c | 4 +--- 2 files changed, 4 insertions(+), 4 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; diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index d5dcf1df..4d94e9e9 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -355,11 +355,9 @@ static void pulse_close(ALCdevice *device) //{{{ ppa_threaded_mainloop_stop(data->loop); ppa_threaded_mainloop_free(data->loop); - device->ExtraData = NULL; - free(device->szDeviceName); - device->szDeviceName = NULL; DestroyRingBuffer(data->ring); + device->ExtraData = NULL; ppa_xfree(data); } //}}} //}}} -- 2.11.4.GIT