Module: wine Branch: master Commit: 3023a186b979386889b472e92f73bf484405a577 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3023a186b979386889b472e92f...
Author: Piotr Caban piotr.caban@gmail.com Date: Fri Apr 11 01:11:03 2008 +0200
oleview: Removed memory leak in EnumImplTypes.
---
programs/oleview/typelib.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c index 96e7574..7215980 100644 --- a/programs/oleview/typelib.c +++ b/programs/oleview/typelib.c @@ -744,8 +744,16 @@ static int EnumImplTypes(ITypeInfo *pTypeInfo, int cImplTypes, HTREEITEM hParent if(FAILED(ITypeInfo_GetRefTypeInfo(pTypeInfo, hRefType, &pRefTypeInfo))) continue; if(FAILED(ITypeInfo_GetDocumentation(pRefTypeInfo, MEMBERID_NIL, &bstrName, - NULL, NULL, NULL))) continue; - if(FAILED(ITypeInfo_GetTypeAttr(pRefTypeInfo, &pTypeAttr))) continue; + NULL, NULL, NULL))) + { + ITypeInfo_Release(pRefTypeInfo); + continue; + } + if(FAILED(ITypeInfo_GetTypeAttr(pRefTypeInfo, &pTypeAttr))) + { + ITypeInfo_Release(pRefTypeInfo); + continue; + }
U(tvis).item.cchTextMax = SysStringLen(bstrName); U(tvis).item.pszText = bstrName;