[PATCH 2/2] regedit: Replace a HeapAlloc() HEAP_ZERO_MEMORY call in framewnd.c
Hugh McMaster
hugh.mcmaster at outlook.com
Wed Aug 2 07:35:51 CDT 2017
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/regedit/framewnd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c
index b82eb1068b..818ccad1b4 100644
--- a/programs/regedit/framewnd.c
+++ b/programs/regedit/framewnd.c
@@ -367,7 +367,10 @@ static void ExportRegistryFile_StoreSelection(HWND hdlg, OPENFILENAMEW *pOpenFil
SendDlgItemMessageW(hdlg, IDC_EXPORT_PATH, WM_GETTEXT, len+1, pOpenFileName->lCustData);
}
else
- pOpenFileName->lCustData = (LPARAM)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR));
+ {
+ pOpenFileName->lCustData = (LPARAM)heap_xalloc(sizeof(WCHAR));
+ memset(&pOpenFileName->lCustData, 0, sizeof(WCHAR));
+ }
}
static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
--
2.13.2
More information about the wine-patches
mailing list