regedit: Free the binary data buffer after saving the new value (Coverity).

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-06-28 10:47:29 +00:00 committed by Alexandre Julliard
parent f62a891385
commit b25337e6d6
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ static INT_PTR CALLBACK bin_modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPara
{
SendDlgItemMessageW(hwndDlg, IDC_VALUE_DATA, HEM_GETDATA, (WPARAM)cbData, (LPARAM)pData);
lRet = RegSetValueExW(params->hKey, params->lpszValueName, 0, REG_BINARY, pData, cbData);
HeapFree(GetProcessHeap(), 0, pData);
}
else
lRet = ERROR_OUTOFMEMORY;