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;
|
HKEY hRootKey = NULL;
|
||||||
if (!hItem)
|
if (!hItem)
|
||||||
hItem = TreeView_GetSelection(hwndTV);
|
hItem = TreeView_GetSelection(hwndTV);
|
||||||
GetItemPath(hwndTV, hItem, &hRootKey);
|
HeapFree(GetProcessHeap(), 0, GetItemPath(hwndTV, hItem, &hRootKey));
|
||||||
if (!bFull && !hRootKey)
|
if (!bFull && !hRootKey)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (hRootKey)
|
if (hRootKey)
|
||||||
|
|
Loading…
Reference in New Issue