From 908fa3eb8d59af2249d144a7f1b8925f97ce8e30 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 2 Feb 2018 15:40:36 +0100 Subject: [PATCH] comdlg32: Correctly initialize the item dialog structure. Signed-off-by: Alexandre Julliard --- dlls/comdlg32/itemdlg.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 30960178573..8aaaa2103e4 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -4597,7 +4597,7 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p if(pUnkOuter) return CLASS_E_NOAGGREGATION; - fdimpl = HeapAlloc(GetProcessHeap(), 0, sizeof(FileDialogImpl)); + fdimpl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FileDialogImpl)); if(!fdimpl) return E_OUTOFMEMORY; @@ -4628,27 +4628,7 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p fdimpl->custom_okbutton = StrDupW(buf); } - fdimpl->filterspecs = NULL; - fdimpl->filterspec_count = 0; - fdimpl->filetypeindex = 0; - - fdimpl->psia_selection = fdimpl->psia_results = NULL; - fdimpl->psi_setfolder = fdimpl->psi_folder = NULL; - list_init(&fdimpl->events_clients); - fdimpl->events_next_cookie = 0; - - fdimpl->dlg_hwnd = NULL; - fdimpl->peb = NULL; - - fdimpl->set_filename = NULL; - fdimpl->default_ext = NULL; - fdimpl->custom_cancelbutton = fdimpl->custom_filenamelabel = NULL; - - fdimpl->client_guid = GUID_NULL; - - fdimpl->hmenu_opendropdown = NULL; - fdimpl->hfont_opendropdown = NULL; /* FIXME: The default folder setting should be restored for the * application if it was previously set. */ -- 2.11.4.GIT