xaudio2_7: Correct reference count on newly created XAudio2 object.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2020-03-09 09:22:19 +00:00 committed by Alexandre Julliard
parent 50aeb5e777
commit 06549f53f9
1 changed files with 1 additions and 3 deletions

View File

@ -1955,10 +1955,8 @@ static HRESULT WINAPI XAudio2CF_CreateInstance(IClassFactory *iface, IUnknown *p
FAudio_RegisterForCallbacks(object->faudio, &object->FAudioEngineCallback_vtbl);
hr = IXAudio2_QueryInterface(&object->IXAudio2_iface, riid, ppobj);
IXAudio2_Release(&object->IXAudio2_iface);
if(FAILED(hr)){
object->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&object->lock);
HeapFree(GetProcessHeap(), 0, object);
return hr;
}