[PATCH 2/3] ole32: Fix memory leak in CompositeMonikerImpl_Construct.

Alexandre Julliard julliard at winehq.org
Mon Apr 11 23:21:38 CDT 2016


Alex Henrie <alexhenrie24 at gmail.com> writes:

> @@ -1848,8 +1848,10 @@ CompositeMonikerImpl_Construct(IMoniker **ppMoniker, IMoniker *pmkFirst, IMonike
>              IMoniker_Release(This->tabMoniker[This->tabLastIndex-1]);
>  
>              This->tabMoniker[This->tabLastIndex-1]=tempMk;
> -        } else
> +        } else{
> +            HeapFree(GetProcessHeap(), 0, This);
>              return res;
> +        }

You'd need to free the contents too, at least This->tabMoniker and its
references.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list