shell32: Fix a use after free (Coverity).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e6ce281d30)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Sven Baars 2019-05-28 23:51:04 +02:00 committed by Michael Stefaniuc
parent 026af56dba
commit 9b2afce2b7
1 changed files with 3 additions and 1 deletions

View File

@ -1289,9 +1289,11 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent,
if(SUCCEEDED(ret))
{
ret = create_shellitemarray(array, cidl, ppsiItemArray);
heap_free(array);
if(SUCCEEDED(ret))
{
heap_free(array);
return ret;
}
}
/* Something failed, clean up. */