Commit a46bfd64 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

oleaut32: Don't leak memory allocated by heap_alloc_zero (coverity).

parent c2233549
......@@ -4070,10 +4070,10 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
SLTG_TypeInfoTail *pTITail;
SLTG_MemberHeader *pMemHeader;
if(strcmp(pBlkEntry[order].index_string + (char*)pMagic,
pOtherTypeInfoBlks[i].index_name)) {
FIXME_(typelib)("Index strings don't match\n");
return NULL;
if(strcmp(pBlkEntry[order].index_string + (char*)pMagic, pOtherTypeInfoBlks[i].index_name)) {
FIXME_(typelib)("Index strings don't match\n");
heap_free(pOtherTypeInfoBlks);
return NULL;
}
pTIHeader = pBlk;
......@@ -4189,6 +4189,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
if(i != pTypeLibImpl->TypeInfoCount) {
FIXME("Somehow processed %d TypeInfos\n", i);
heap_free(pOtherTypeInfoBlks);
return NULL;
}
......
......@@ -5272,7 +5272,8 @@ static ICreateTypeLib2 *ICreateTypeLib2_Constructor(SYSKIND syskind, LPCOLESTR f
if (failed) {
ICreateTypeLib2_fnRelease(&create_tlib2->ICreateTypeLib2_iface);
return NULL;
heap_free(create_tlib2);
return NULL;
}
return &create_tlib2->ICreateTypeLib2_iface;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment