regedit: Free the stringValueData buffer before using it again (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-15 11:58:54 +00:00 committed by Alexandre Julliard
parent 06b0a6d94d
commit b1e48fb469
1 changed files with 1 additions and 0 deletions

View File

@ -378,6 +378,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
{
int index = SendMessageW(g_pChildWnd->hListWnd, LVM_GETNEXTITEM, -1,
MAKELPARAM(LVNI_FOCUSED | LVNI_SELECTED, 0));
HeapFree(GetProcessHeap(), 0, stringValueData);
stringValueData = read_value(hwnd, hKey, valueName, &type, &len);
format_value_data(g_pChildWnd->hListWnd, index, type, stringValueData, len);
}