Re: ole32: Fix some memory leaks
Andrew Talbot <andrew.talbot(a)talbotville.com> writes:
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index c49e9b8..88f141e 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -1817,8 +1817,10 @@ CompositeMonikerImpl_Construct(IMoniker* This->tabSize+=BLOCK_TAB_SIZE; This->tabMoniker=HeapReAlloc(GetProcessHeap(),0,This->tabMoniker,This->tabSize*sizeof(IMoniker));
- if (This->tabMoniker==NULL) + if (This->tabMoniker==NULL) { + HeapFree(GetProcessHeap(), 0, This); return E_OUTOFMEMORY;
This->tabMoniker is leaked too in that case, it would be good to fix it while you are at it. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard