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
5f0d53e2
Commit
5f0d53e2
authored
Aug 18, 2019
by
Sven Baars
Committed by
Alexandre Julliard
Aug 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Fix a path leak (Valgrind).
Signed-off-by:
Sven Baars
<
sven.wine@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
448f4cc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
queue.c
dlls/setupapi/queue.c
+13
-7
No files found.
dlls/setupapi/queue.c
View file @
5f0d53e2
...
@@ -1408,13 +1408,20 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
...
@@ -1408,13 +1408,20 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
* actually isn't in a subdirectory, but keep track of what it
* actually isn't in a subdirectory, but keep track of what it
* was, and then later strip it from the root path that we
* was, and then later strip it from the root path that we
* ultimately resolve the source disk to. */
* ultimately resolve the source disk to. */
WCHAR
*
src_path
=
op
->
src_path
;
WCHAR
src_path
[
MAX_PATH
];
size_t
path_len
=
0
;
op
->
src_path
=
NULL
;
src_path
[
0
]
=
0
;
if
(
src_path
)
if
(
op
->
src_path
)
{
{
lstrcpyW
(
src_path
,
op
->
src_path
);
path_len
=
lstrlenW
(
src_path
);
lstrcatW
(
op
->
media
->
root
,
backslashW
);
lstrcatW
(
op
->
media
->
root
,
backslashW
);
lstrcatW
(
op
->
media
->
root
,
src_path
);
lstrcatW
(
op
->
media
->
root
,
op
->
src_path
);
heap_free
(
op
->
src_path
);
op
->
src_path
=
NULL
;
}
}
for
(;;)
for
(;;)
...
@@ -1450,12 +1457,11 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
...
@@ -1450,12 +1457,11 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
if
(
queue_copy_file
(
paths
.
Source
,
paths
.
Target
,
op
,
handler
,
context
))
if
(
queue_copy_file
(
paths
.
Source
,
paths
.
Target
,
op
,
handler
,
context
))
{
{
if
(
src_path
&&
!
op
->
media
->
cabinet
)
if
(
path_len
>
0
&&
!
op
->
media
->
cabinet
)
{
{
size_t
root_len
=
lstrlenW
(
op
->
media
->
root
)
,
path_len
=
lstrlenW
(
src_path
)
;
size_t
root_len
=
lstrlenW
(
op
->
media
->
root
);
if
(
path_len
<=
root_len
&&
!
wcsnicmp
(
op
->
media
->
root
+
root_len
-
path_len
,
src_path
,
path_len
))
if
(
path_len
<=
root_len
&&
!
wcsnicmp
(
op
->
media
->
root
+
root_len
-
path_len
,
src_path
,
path_len
))
op
->
media
->
root
[
root_len
-
path_len
-
1
]
=
0
;
op
->
media
->
root
[
root_len
-
path_len
-
1
]
=
0
;
heap_free
(
src_path
);
}
}
op
->
media
->
resolved
=
TRUE
;
op
->
media
->
resolved
=
TRUE
;
handler
(
context
,
SPFILENOTIFY_ENDCOPY
,
(
UINT_PTR
)
&
paths
,
0
);
handler
(
context
,
SPFILENOTIFY_ENDCOPY
,
(
UINT_PTR
)
&
paths
,
0
);
...
...
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