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

This commit is contained in:
André Hentschel 2012-10-28 16:16:54 +01:00 committed by Alexandre Julliard
parent c223354912
commit a46bfd644d
2 changed files with 7 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;