regedit: Fix memory leaks in favourites handling.
This commit is contained in:
parent
455ce06d4f
commit
ded5b05e4a
@ -531,6 +531,7 @@ static INT_PTR CALLBACK addtofavorites_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM w
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
|
||||
SetWindowTextW(hwndValue, ItemPath);
|
||||
SendMessageW(hwndValue, EM_SETLIMITTEXT, 127, 0);
|
||||
HeapFree(GetProcessHeap(), 0, ItemPath);
|
||||
return TRUE;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
|
@ -208,7 +208,10 @@ HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName) {
|
||||
if (!lstrcmpiW(tvi.pszText, lpItemName)) {
|
||||
SendMessageW(hwndTV, TVM_EXPAND, TVE_EXPAND, (LPARAM)hItem );
|
||||
if (!lpKeyName)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, lpItemName);
|
||||
return hItem;
|
||||
}
|
||||
hOldItem = hItem;
|
||||
hItem = TreeView_GetChild(hwndTV, hItem);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user