Jacek Caban : rpcrt4: Fix use after free in get_iface_info.
Alexandre Julliard
julliard at winehq.org
Thu Mar 26 16:27:26 CDT 2020
Module: wine
Branch: master
Commit: bfab009e67338d3f6b0142c55ec3383a5147f6a3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bfab009e67338d3f6b0142c55ec3383a5147f6a3
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Mar 26 20:54:05 2020 +0100
rpcrt4: Fix use after free 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 | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c
index 91c4a07464..f1f25885b7 100644
--- a/dlls/rpcrt4/ndr_typelib.c
+++ b/dlls/rpcrt4/ndr_typelib.c
@@ -1276,18 +1276,18 @@ 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;
- *parentiid = typeattr->guid;
- ITypeInfo_ReleaseTypeAttr(parentinfo, typeattr);
-
- return S_OK;
+ hr = ITypeInfo_GetTypeAttr(parentinfo, &typeattr);
+ if (SUCCEEDED(hr))
+ {
+ *parentiid = typeattr->guid;
+ ITypeInfo_ReleaseTypeAttr(parentinfo, typeattr);
+ }
+ ITypeInfo_Release(parentinfo);
+ if (SUCCEEDED(hr))
+ return hr;
err:
ITypeInfo_Release(*real_typeinfo);
More information about the wine-cvs
mailing list