Module: wine Branch: master Commit: 1291c6ded4d49c3ed44f19352c506ea7fd53580c URL: https://source.winehq.org/git/wine.git/?a=commit;h=1291c6ded4d49c3ed44f19352...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Mon Jul 16 12:20:45 2018 +0000
regedit: Don't check if heap_xalloc() succeeded in the caller.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/regedit/edit.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 3e5b9dd..00dcbec 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -157,14 +157,9 @@ static INT_PTR CALLBACK bin_modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPara cbData = SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, 0, 0); pData = heap_xalloc(cbData);
- if (pData) - { - SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, (WPARAM)cbData, (LPARAM)pData); - lRet = RegSetValueExW(params->hKey, params->lpszValueName, 0, REG_BINARY, pData, cbData); - heap_free(pData); - } - else - lRet = ERROR_OUTOFMEMORY; + SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, (WPARAM)cbData, (LPARAM)pData); + lRet = RegSetValueExW(params->hKey, params->lpszValueName, 0, REG_BINARY, pData, cbData); + heap_free(pData);
if (lRet == ERROR_SUCCESS) EndDialog(hwndDlg, 1);