ole32: Fix memory leak in compositemoniker.c (found by Smatch).

oldstable
Lionel Debroux 2007-09-01 16:36:11 +02:00 committed by Alexandre Julliard
parent beaa1cde64
commit caca06aa7f
1 changed files with 3 additions and 1 deletions

View File

@ -1786,8 +1786,10 @@ CompositeMonikerImpl_Construct(IMoniker** ppMoniker,
This->tabLastIndex=0;
This->tabMoniker=HeapAlloc(GetProcessHeap(),0,This->tabSize*sizeof(IMoniker));
if (This->tabMoniker==NULL)
if (This->tabMoniker==NULL) {
HeapFree(GetProcessHeap(), 0, This);
return E_OUTOFMEMORY;
}
if (!pmkFirst && !pmkRest)
{