Properly free the device name
This commit is contained in:
@@ -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
@@ -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);
|
||||
} //}}}
|
||||
//}}}
|
||||
|
||||
Reference in New Issue
Block a user