forked from Mirrors/wine-wine
ole32: Fix memory leak in compositemoniker.c (found by Smatch).
parent
beaa1cde64
commit
caca06aa7f
|
@ -1786,8 +1786,10 @@ CompositeMonikerImpl_Construct(IMoniker** ppMoniker,
|
||||||
This->tabLastIndex=0;
|
This->tabLastIndex=0;
|
||||||
|
|
||||||
This->tabMoniker=HeapAlloc(GetProcessHeap(),0,This->tabSize*sizeof(IMoniker));
|
This->tabMoniker=HeapAlloc(GetProcessHeap(),0,This->tabSize*sizeof(IMoniker));
|
||||||
if (This->tabMoniker==NULL)
|
if (This->tabMoniker==NULL) {
|
||||||
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
if (!pmkFirst && !pmkRest)
|
if (!pmkFirst && !pmkRest)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue