Module: wine Branch: oldstable Commit: ba4a8793889872c616f9989d8a70be563e998788 URL: https://gitlab.winehq.org/wine/wine/-/commit/ba4a8793889872c616f9989d8a70be5...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Sep 9 16:18:00 2022 +0200
shell32: Don't return an uninitialized pointer on error in enum_trash_items().
(cherry picked from commit 33c56be5ae1cf757c1aeda0e075d63cc924f683b) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/shell32/recyclebin.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index 8cfc1042fe7..ffe12823e7a 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"\*" );