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
48921844
Commit
48921844
authored
Nov 25, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Free wine_get_dos_file_name memory with HeapFree.
parent
76696cd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
addons.c
dlls/appwiz.cpl/addons.c
+5
-5
No files found.
dlls/appwiz.cpl/addons.c
View file @
48921844
...
...
@@ -233,7 +233,7 @@ static enum install_res install_from_unix_file(const char *dir, const WCHAR *sub
if
(
p_wine_get_dos_file_name
&&
(
dos_dir
=
p_wine_get_dos_file_name
(
dir
)))
{
ret
=
install_from_dos_file
(
dos_dir
,
subdir
,
file_name
);
free
(
dos_dir
);
HeapFree
(
GetProcessHeap
(),
0
,
dos_dir
);
}
return
ret
;
}
...
...
@@ -329,7 +329,7 @@ static WCHAR *get_cache_file_name(BOOL ensure_exists)
}
else
if
((
home_dir
=
_wgetenv
(
L"WINEHOMEDIR"
)))
{
if
(
!
(
cache_dir
=
malloc
(
wcslen
(
home_dir
)
*
sizeof
(
WCHAR
)
+
sizeof
(
L"
\\
.cache"
)
)))
return
NULL
;
if
(
!
(
cache_dir
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wcslen
(
home_dir
)
*
sizeof
(
WCHAR
)
+
sizeof
(
L"
\\
.cache"
)
)))
return
NULL
;
lstrcpyW
(
cache_dir
,
home_dir
);
lstrcatW
(
cache_dir
,
L"
\\
.cache"
);
cache_dir
[
1
]
=
'\\'
;
/* change \??\ into \\?\ */
...
...
@@ -339,19 +339,19 @@ static WCHAR *get_cache_file_name(BOOL ensure_exists)
if
(
ensure_exists
&&
!
CreateDirectoryW
(
cache_dir
,
NULL
)
&&
GetLastError
()
!=
ERROR_ALREADY_EXISTS
)
{
WARN
(
"%s does not exist and could not be created (%lu)
\n
"
,
debugstr_w
(
cache_dir
),
GetLastError
()
);
free
(
cache_dir
);
HeapFree
(
GetProcessHeap
(),
0
,
cache_dir
);
return
NULL
;
}
size
=
lstrlenW
(
cache_dir
)
+
ARRAY_SIZE
(
L"
\\
wine"
)
+
lstrlenW
(
addon
->
file_name
)
+
1
;
if
(
!
(
ret
=
malloc
(
size
*
sizeof
(
WCHAR
)
)))
{
free
(
cache_dir
);
HeapFree
(
GetProcessHeap
(),
0
,
cache_dir
);
return
NULL
;
}
lstrcpyW
(
ret
,
cache_dir
);
lstrcatW
(
ret
,
L"
\\
wine"
);
free
(
cache_dir
);
HeapFree
(
GetProcessHeap
(),
0
,
cache_dir
);
if
(
ensure_exists
&&
!
CreateDirectoryW
(
ret
,
NULL
)
&&
GetLastError
()
!=
ERROR_ALREADY_EXISTS
)
{
...
...
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