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

This commit is contained in:
Lionel Debroux 2007-09-01 16:36:11 +02:00 committed by Alexandre Julliard
parent beaa1cde64
commit caca06aa7f

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)
{