rpcrt4: Fix ITypeInfo leak in get_iface_info.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a09c08f17a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
stable
Kevin Puetz 2020-01-27 16:02:27 +01:00 committed by Michael Stefaniuc
parent fd6fe42003
commit 37d3edf9c9
1 changed files with 6 additions and 4 deletions

View File

@ -1265,14 +1265,16 @@ static HRESULT get_iface_info(ITypeInfo *typeinfo, WORD *funcs, WORD *parentfunc
if (FAILED(hr))
goto err;
hr = ITypeInfo_GetRefTypeInfo(*real_typeinfo, reftype, &parentinfo);
if (SUCCEEDED(hr))
{
hr = ITypeInfo_GetTypeAttr(parentinfo, &typeattr);
ITypeInfo_Release(parentinfo);
}
if (FAILED(hr))
goto err;
hr = ITypeInfo_GetTypeAttr(parentinfo, &typeattr);
if (FAILED(hr))
goto err;
*parentiid = typeattr->guid;
ITypeInfo_ReleaseTypeAttr(parentinfo, typeattr);
ITypeInfo_Release(parentinfo);
return S_OK;