[PATCH] shell32: Stop memory leak (valgrind)

Nikolay Sivov bunglehead at gmail.com
Thu Oct 29 04:25:08 CDT 2015


On 29.10.2015 12:21, Alistair Leslie-Hughes wrote:
> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
> ---
>   dlls/shell32/shellitem.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
> index f64c2d0..799c6c0 100644
> --- a/dlls/shell32/shellitem.c
> +++ b/dlls/shell32/shellitem.c
> @@ -1198,7 +1198,10 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent,
>       {
>           ret = create_shellitemarray(array, cidl, ppsiItemArray);
>           if(SUCCEEDED(ret))
> +        {
> +            HeapFree(GetProcessHeap(), 0, array);
>               return ret;
> +        }
>       }
>
>       /* Something failed, clean up. */
>

There is another place with same problem, I just sent a complete fix.



More information about the wine-devel mailing list