Commit a7a08e29 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Free allocated memory after calling GetValueName().

parent 1291c6de
......@@ -853,10 +853,11 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case ID_EDIT_MODIFY:
case ID_EDIT_MODIFY_BIN:
{
LPCWSTR valueName = GetValueName(g_pChildWnd->hListWnd);
WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
WCHAR *valueName = GetValueName(g_pChildWnd->hListWnd);
WCHAR *keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
ModifyValue(hWnd, hKeyRoot, keyPath, valueName);
heap_free(keyPath);
heap_free(valueName);
break;
}
case ID_EDIT_FIND:
......
......@@ -63,7 +63,7 @@ LPWSTR GetItemText(HWND hwndLV, UINT item)
return NULL;
}
LPCWSTR GetValueName(HWND hwndLV)
WCHAR *GetValueName(HWND hwndLV)
{
INT item;
......
......@@ -150,7 +150,7 @@ int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highlightValue);
HWND StartValueRename(HWND hwndLV);
LPWSTR GetItemText(HWND hwndLV, UINT item);
LPCWSTR GetValueName(HWND hwndLV);
WCHAR *GetValueName(HWND hwndLV);
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
BOOL IsDefaultValue(HWND hwndLV, int i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment