Kevin Puetz : rpcrt4: Fix ITypeInfo leak in get_iface_info.
Alexandre Julliard
julliard at winehq.org
Mon Jan 27 15:00:24 CST 2020
Module: wine
Branch: master
Commit: a09c08f17a1ace1205e4c579c4f08b548258d539
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a09c08f17a1ace1205e4c579c4f08b548258d539
Author: Kevin Puetz <PuetzKevinA at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list