shell32: Fix temporary item array leak (Valgrind).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2015-10-29 12:23:57 +03:00 committed by Alexandre Julliard
parent bcac15a56f
commit 4e88852415
1 changed files with 2 additions and 0 deletions

View File

@ -1197,6 +1197,7 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent,
if(SUCCEEDED(ret))
{
ret = create_shellitemarray(array, cidl, ppsiItemArray);
HeapFree(GetProcessHeap(), 0, array);
if(SUCCEEDED(ret))
return ret;
}
@ -1310,6 +1311,7 @@ HRESULT WINAPI SHCreateShellItemArrayFromIDLists(UINT cidl,
if(SUCCEEDED(ret))
{
ret = create_shellitemarray(array, cidl, psia);
HeapFree(GetProcessHeap(), 0, array);
if(SUCCEEDED(ret))
return ret;
}