oleaut32: Don't leak BSTRs allocated in string_list and name_list.

This commit is contained in:
Piotr Caban 2013-07-30 15:19:37 +02:00 committed by Alexandre Julliard
parent 4133fb4341
commit 6d6c3e5d81
1 changed files with 2 additions and 0 deletions

View File

@ -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_FOR_EACH_ENTRY_SAFE(tlbstr, tlbstr_next, &This->string_list, TLBString, entry) {
list_remove(&tlbstr->entry); list_remove(&tlbstr->entry);
SysFreeString(tlbstr->str);
heap_free(tlbstr); heap_free(tlbstr);
} }
LIST_FOR_EACH_ENTRY_SAFE(tlbstr, tlbstr_next, &This->name_list, TLBString, entry) { LIST_FOR_EACH_ENTRY_SAFE(tlbstr, tlbstr_next, &This->name_list, TLBString, entry) {
list_remove(&tlbstr->entry); list_remove(&tlbstr->entry);
SysFreeString(tlbstr->str);
heap_free(tlbstr); heap_free(tlbstr);
} }