shlwapi/path: Proper use of GetProcessHeap().

This commit is contained in:
Paul Vriens 2007-03-23 20:49:00 +01:00 committed by Alexandre Julliard
parent a85b3c9f71
commit 20291e082c

View file

@ -1181,7 +1181,7 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
/* Try dirs listed in %PATH% */
dwLenPATH = GetEnvironmentVariableW(szPath, buff, MAX_PATH);
if (!dwLenPATH || !(lpszPATH = HeapAlloc(GetProcessHeap, 0, (dwLenPATH + 1) * sizeof (WCHAR))))
if (!dwLenPATH || !(lpszPATH = HeapAlloc(GetProcessHeap(), 0, (dwLenPATH + 1) * sizeof (WCHAR))))
return FALSE;
GetEnvironmentVariableW(szPath, lpszPATH, dwLenPATH + 1);
@ -1204,17 +1204,17 @@ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
if (!PathAppendW(buff, lpszFile))
{
HeapFree(GetProcessHeap, 0, lpszPATH);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return FALSE;
}
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
HeapFree(GetProcessHeap, 0, lpszPATH);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return TRUE;
}
}
HeapFree(GetProcessHeap, 0, lpszPATH);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return FALSE;
}