Properly free the device name

This commit is contained in:
Chris Robinson
2009-10-31 13:25:26 -07:00
parent a3fcd67a82
commit 9d43907710
2 changed files with 5 additions and 5 deletions
+4 -2
View File
@@ -657,9 +657,11 @@ ALCAPI ALCboolean ALCAPIENTRY alcCaptureCloseDevice(ALCdevice *pDevice)
ProcessContext(NULL);
free(pDevice->szDeviceName);
ALCdevice_CloseCapture(pDevice);
free(pDevice->szDeviceName);
pDevice->szDeviceName = NULL;
free(pDevice);
bReturn = ALC_TRUE;
+1 -3
View File
@@ -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);
} //}}}
//}}}