mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 18:15:36 +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
|
@ -487,9 +487,15 @@ static void deinit_refresh_devices(struct RefreshDevices *rd) {
|
|||
if (rd->mm_device)
|
||||
IMMDevice_Release(rd->mm_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