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:
parent
50aeb5e777
commit
06549f53f9
|
@ -1955,10 +1955,8 @@ static HRESULT WINAPI XAudio2CF_CreateInstance(IClassFactory *iface, IUnknown *p
|
||||||
FAudio_RegisterForCallbacks(object->faudio, &object->FAudioEngineCallback_vtbl);
|
FAudio_RegisterForCallbacks(object->faudio, &object->FAudioEngineCallback_vtbl);
|
||||||
|
|
||||||
hr = IXAudio2_QueryInterface(&object->IXAudio2_iface, riid, ppobj);
|
hr = IXAudio2_QueryInterface(&object->IXAudio2_iface, riid, ppobj);
|
||||||
|
IXAudio2_Release(&object->IXAudio2_iface);
|
||||||
if(FAILED(hr)){
|
if(FAILED(hr)){
|
||||||
object->lock.DebugInfo->Spare[0] = 0;
|
|
||||||
DeleteCriticalSection(&object->lock);
|
|
||||||
HeapFree(GetProcessHeap(), 0, object);
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue