From 3f5fd0f760cee95cac23ca558c32d16a25f4c2e2 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Tue, 3 Feb 2009 09:39:57 +0000 Subject: [PATCH] Fix freeing the allocated string SID svn path=/trunk/; revision=39304 --- reactos/dll/win32/shell32/shellpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/shell32/shellpath.c b/reactos/dll/win32/shell32/shellpath.c index 59b0c03c7ce..f196ce624e0 100644 --- a/reactos/dll/win32/shell32/shellpath.c +++ b/reactos/dll/win32/shell32/shellpath.c @@ -1197,7 +1197,7 @@ static HRESULT _SHGetUserProfilePath(HANDLE hToken, DWORD dwFlags, BYTE folder, hr = _SHGetUserShellFolderPath(hRootKey, userPrefix, CSIDL_Data[folder].szValueName, pszPath); /* Free the memory allocated by ConvertSidToStringSidW */ - if(!hToken && hToken != (HANDLE)-1) + if(hToken && hToken != (HANDLE)-1) LocalFree(userPrefix); if (FAILED(hr) && hRootKey != HKEY_LOCAL_MACHINE)