Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
da3d6815
Commit
da3d6815
authored
Nov 10, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Use HeapAlloc/Free instead of malloc/free.
parent
4bd11764
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
path.c
dlls/shlwapi/path.c
+4
-4
No files found.
dlls/shlwapi/path.c
View file @
da3d6815
...
...
@@ -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
=
malloc
(
(
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
))
{
free
(
lpszPATH
);
HeapFree
(
GetProcessHeap
,
0
,
lpszPATH
);
return
FALSE
;
}
if
(
PathFileExistsDefExtW
(
buff
,
dwWhich
))
{
strcpyW
(
lpszFile
,
buff
);
free
(
lpszPATH
);
HeapFree
(
GetProcessHeap
,
0
,
lpszPATH
);
return
TRUE
;
}
}
free
(
lpszPATH
);
HeapFree
(
GetProcessHeap
,
0
,
lpszPATH
);
return
FALSE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment