From: Zebediah Figura <zfigura(a)codeweavers.com> 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); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5154