Alistair Leslie-Hughes : xaudio2_7: Correct reference count on newly created IXAPO object.
Module: wine Branch: master Commit: 0c65a00c338cfa428d5b40f4f725dc91cd88eb6b URL: https://source.winehq.org/git/wine.git/?a=commit;h=0c65a00c338cfa428d5b40f4f... Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Mar 9 10:10:30 2020 +0000 xaudio2_7: Correct reference count on newly created IXAPO object. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xaudio2_7/xapo.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/xaudio2_7/xapo.c b/dlls/xaudio2_7/xapo.c index 9788cb38e8..e64523ea19 100644 --- a/dlls/xaudio2_7/xapo.c +++ b/dlls/xaudio2_7/xapo.c @@ -367,12 +367,9 @@ static HRESULT WINAPI xapocf_CreateInstance(IClassFactory *iface, IUnknown *pOut } hr = IXAPO_QueryInterface(&object->IXAPO_iface, riid, ppobj); - if(FAILED(hr)){ - HeapFree(GetProcessHeap(), 0, object); - return hr; - } + IXAPO_Release(&object->IXAPO_iface); - return S_OK; + return hr; } static HRESULT WINAPI xapocf_LockServer(IClassFactory *iface, BOOL dolock)
participants (1)
-
Alexandre Julliard