shell32: Don't return an uninitialized pointer on error in enum_trash_items().

This commit is contained in:
Alexandre Julliard 2022-09-09 16:18:00 +02:00
parent bcf52b7c64
commit 33c56be5ae

View file

@ -392,6 +392,7 @@ static HRESULT enum_trash_items( LPITEMIDLIST **pidls, int *ret_count )
InitOnceExecuteOnce( &trash_dir_once, init_trash_dirs, NULL, NULL );
if (!trash_dir) return E_FAIL;
*pidls = NULL;
file = heap_alloc( (lstrlenW(trash_dir) + lstrlenW(L"\\*") + 1) * sizeof(WCHAR) );
lstrcpyW( file, trash_dir );
lstrcatW( file, L"\\*" );