FAudioCOMConstructWithCustomAllocatorEXT initialize the reference count to 1, then QueryInterface increase the count to 2. Thus the finial release wont be called if a balanced AddRef/Release is used.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/xaudio2_7/xaudio_dll.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index a87e0124d3..1a440072cb 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -1961,6 +1961,7 @@ static HRESULT WINAPI XAudio2CF_CreateInstance(IClassFactory *iface, IUnknown *p HeapFree(GetProcessHeap(), 0, object); return hr; } + IXAudio2_Release(&object->IXAudio2_iface);
TRACE("Created XAudio version %u: %p\n", 20 + XAUDIO2_VER, object);
This probably leaks on QueryInterface() failure path.