From 33c56be5ae1cf757c1aeda0e075d63cc924f683b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 9 Sep 2022 16:18:00 +0200 Subject: [PATCH] shell32: Don't return an uninitialized pointer on error in enum_trash_items(). --- dlls/shell32/recyclebin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index 7a03dd13a6d..cc3c6a3654c 100644 --- a/dlls/shell32/recyclebin.c +++ b/dlls/shell32/recyclebin.c @@ -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"\\*" );