mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 13:05:40 +00:00
Fixed memory leak (#222)
* Fixed memory leak * Update src/wasapi.c Co-authored-by: TimTim <i@timtim.hk> * Update src/wasapi.c Co-authored-by: TimTim <i@timtim.hk> Co-authored-by: TimTim <i@timtim.hk>
This commit is contained in:
parent
b810bf2e9c
commit
a46b0f21c3
10
src/wasapi.c
10
src/wasapi.c
|
@ -486,10 +486,16 @@ static void deinit_refresh_devices(struct RefreshDevices *rd) {
|
|||
soundio_device_unref(rd->device_raw);
|
||||
if (rd->mm_device)
|
||||
IMMDevice_Release(rd->mm_device);
|
||||
if (rd->default_render_device)
|
||||
IMMDevice_Release(rd->default_render_device);
|
||||
if (rd->default_render_device)
|
||||
{
|
||||
IMMDevice_Release(rd->default_render_device);
|
||||
free(rd->default_render_id);
|
||||
}
|
||||
if (rd->default_capture_device)
|
||||
{
|
||||
IMMDevice_Release(rd->default_capture_device);
|
||||
free(rd->default_capture_id);
|
||||
}
|
||||
if (rd->collection)
|
||||
IMMDeviceCollection_Release(rd->collection);
|
||||
if (rd->lpwstr)
|
||||
|
|
Loading…
Reference in a new issue