fixed changing registry value after name
authorSebastian Gasiorek <sebastian.gasiorek@reactos.org>
Sat, 26 Nov 2005 16:46:53 +0000 (16:46 +0000)
committerSebastian Gasiorek <sebastian.gasiorek@reactos.org>
Sat, 26 Nov 2005 16:46:53 +0000 (16:46 +0000)
svn path=/trunk/; revision=19644

reactos/subsys/system/regedit/listview.c

index bc4a4a4..3e583f8 100644 (file)
@@ -456,6 +456,9 @@ BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
                          LONG lResult;
                          keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
                          lResult = RegRenameValue(hKeyRoot, keyPath, Info->item.pszText, lineinfo->name);
+                          if (lineinfo->name)
+                            LocalFree(lineinfo->name);
+                          lineinfo->name = _tcsdup(Info->item.pszText);
                      *Result = TRUE;
                      return (lResult == ERROR_SUCCESS);
                        }