From fef36600242fd603bbc03633d747595d01ef660c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 31 Aug 2008 01:23:17 +0200 Subject: [PATCH] regedit: Fix a memory leak. --- programs/regedit/childwnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index bb8cf6f2461..9e6e9e0bd73 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -138,7 +138,7 @@ static LPWSTR GetPathRoot(HWND hwndTV, HTREEITEM hItem, BOOL bFull) { HKEY hRootKey = NULL; if (!hItem) hItem = TreeView_GetSelection(hwndTV); - GetItemPath(hwndTV, hItem, &hRootKey); + HeapFree(GetProcessHeap(), 0, GetItemPath(hwndTV, hItem, &hRootKey)); if (!bFull && !hRootKey) return NULL; if (hRootKey)