Module: wine Branch: master Commit: f7c665fd6ec73bdd781e2f5c3fac41c606172865 URL: https://gitlab.winehq.org/wine/wine/-/commit/f7c665fd6ec73bdd781e2f5c3fac41c...
Author: Zebediah Figura zfigura@codeweavers.com Date: Sun Feb 25 17:10:32 2024 -0600
shell32: Also zero-initialize the background menu.
Fixes: 063a377df4fe7d9118dec1d4fd198f97c2eba710
---
dlls/shell32/shlview_cmenu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index 9057d7c0175..a5592d3c830 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -1541,8 +1541,8 @@ HRESULT BackgroundMenu_Constructor(IShellFolder *parent, BOOL desktop, REFIID ri ContextMenu *This; HRESULT hr;
- This = malloc(sizeof(*This)); - if (!This) return E_OUTOFMEMORY; + if (!(This = calloc(1, sizeof(*This)))) + return E_OUTOFMEMORY;
This->IContextMenu3_iface.lpVtbl = &BackgroundContextMenuVtbl; This->IShellExtInit_iface.lpVtbl = &ShellExtInitVtbl; @@ -1550,10 +1550,6 @@ HRESULT BackgroundMenu_Constructor(IShellFolder *parent, BOOL desktop, REFIID ri This->ref = 1; This->parent = parent;
- This->pidl = NULL; - This->apidl = NULL; - This->cidl = 0; - This->desktop = desktop; if (parent) IShellFolder_AddRef(parent);