Module: wine Branch: master Commit: a09c08f17a1ace1205e4c579c4f08b548258d539 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a09c08f17a1ace1205e4c579c...
Author: Kevin Puetz PuetzKevinA@JohnDeere.com Date: Mon Jan 27 16:02:27 2020 +0100
rpcrt4: Fix ITypeInfo leak in get_iface_info.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/rpcrt4/ndr_typelib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index 7cb7da18ad..fb78c9b5ab 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -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;