Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/mmdevapi/devenum.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index 9e4a29816ce..3060724d54c 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -856,6 +856,7 @@ static const IMMDeviceCollectionVtbl MMDevColVtbl = HRESULT MMDevEnum_Create(REFIID riid, void **ppv) { MMDevEnumImpl *This = MMDevEnumerator; + HRESULT hr;
if (!This) { @@ -871,7 +872,9 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv) load_driver_devices(eRender); load_driver_devices(eCapture); } - return IMMDeviceEnumerator_QueryInterface(&This->IMMDeviceEnumerator_iface, riid, ppv); + hr = IMMDeviceEnumerator_QueryInterface(&This->IMMDeviceEnumerator_iface, riid, ppv); + IMMDeviceEnumerator_Release(&This->IMMDeviceEnumerator_iface); + return hr; }
void MMDevEnum_Free(void)