--- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -1402,9 +1402,11 @@ HRESULT WINAPI SHCreateShellItemArrayFromIDLists(UINT cidl,> if(SUCCEEDED(ret)) {
ret = create_shellitemarray(array, cidl, psia);
heap_free(array); if(SUCCEEDED(ret))
{
heap_free(array); return ret;
} } for(i = 0; i < cidl; i++)
-- 2.36.0
It would be shorter to release array elements when FAILED(), and have a single call to free pointers array.
We have a very similar case in SHCreateShellItemArray, want me to rewrite that to use the same approach then?
Regards, Fabian Maurer