regedit: Fix a memory leak.
This commit is contained in:
parent
e26b563ee1
commit
fef3660024
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue