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>
This commit is contained in:
parent
2686166cc1
commit
1291c6ded4
|
@ -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);
|
cbData = SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, 0, 0);
|
||||||
pData = heap_xalloc(cbData);
|
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);
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, (WPARAM)cbData, (LPARAM)pData);
|
heap_free(pData);
|
||||||
lRet = RegSetValueExW(params->hKey, params->lpszValueName, 0, REG_BINARY, pData, cbData);
|
|
||||||
heap_free(pData);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
lRet = ERROR_OUTOFMEMORY;
|
|
||||||
|
|
||||||
if (lRet == ERROR_SUCCESS)
|
if (lRet == ERROR_SUCCESS)
|
||||||
EndDialog(hwndDlg, 1);
|
EndDialog(hwndDlg, 1);
|
||||||
|
|
Loading…
Reference in New Issue