From 6d6c3e5d81a6f93800982498bd206ec2fc8be23f Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 30 Jul 2013 15:19:37 +0200 Subject: [PATCH] oleaut32: Don't leak BSTRs allocated in string_list and name_list. --- dlls/oleaut32/typelib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 1041e1b37cd..b0cfc88bbac 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4594,11 +4594,13 @@ static ULONG WINAPI ITypeLib2_fnRelease( ITypeLib2 *iface) LIST_FOR_EACH_ENTRY_SAFE(tlbstr, tlbstr_next, &This->string_list, TLBString, entry) { list_remove(&tlbstr->entry); + SysFreeString(tlbstr->str); heap_free(tlbstr); } LIST_FOR_EACH_ENTRY_SAFE(tlbstr, tlbstr_next, &This->name_list, TLBString, entry) { list_remove(&tlbstr->entry); + SysFreeString(tlbstr->str); heap_free(tlbstr); }