regedit: Fix a memory leak.

This commit is contained in:
Alexander Nicolaysen Sørnes 2008-08-31 01:23:17 +02:00 committed by Alexandre Julliard
parent e26b563ee1
commit fef3660024
1 changed files with 1 additions and 1 deletions

View File

@ -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)