Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
63231be8
Commit
63231be8
authored
Dec 06, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Dec 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Fix memory leak.
Found by Valgrind.
parent
e5e17ca4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
queue.c
dlls/setupapi/queue.c
+9
-5
No files found.
dlls/setupapi/queue.c
View file @
63231be8
...
...
@@ -722,8 +722,9 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf,
{
SP_FILE_COPY_PARAMS_W
params
;
INFCONTEXT
context
;
WCHAR
dest
[
MAX_PATH
],
src
[
MAX_PATH
];
WCHAR
dest
[
MAX_PATH
],
src
[
MAX_PATH
]
,
*
dest_dir
;
INT
flags
;
BOOL
ret
=
FALSE
;
TRACE
(
"hinf=%p/%p section=%s root=%s
\n
"
,
hinf
,
hlist
,
debugstr_w
(
section
),
debugstr_w
(
src_root
)
);
...
...
@@ -742,18 +743,21 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf,
if
(
!
hlist
)
hlist
=
hinf
;
if
(
!
hinf
)
hinf
=
hlist
;
if
(
!
SetupFindFirstLineW
(
hlist
,
section
,
NULL
,
&
context
))
return
FALSE
;
if
(
!
(
params
.
TargetDirectory
=
get_destination_dir
(
hinf
,
section
)))
return
FALSE
;
if
(
!
(
params
.
TargetDirectory
=
dest_dir
=
get_destination_dir
(
hinf
,
section
)))
return
FALSE
;
do
{
if
(
!
SetupGetStringFieldW
(
&
context
,
1
,
dest
,
sizeof
(
dest
)
/
sizeof
(
WCHAR
),
NULL
))
return
FALSE
;
goto
end
;
if
(
!
SetupGetStringFieldW
(
&
context
,
2
,
src
,
sizeof
(
src
)
/
sizeof
(
WCHAR
),
NULL
))
*
src
=
0
;
if
(
!
SetupGetIntField
(
&
context
,
4
,
&
flags
))
flags
=
0
;
/* FIXME */
params
.
SourceFilename
=
*
src
?
src
:
NULL
;
if
(
!
SetupQueueCopyIndirectW
(
&
params
))
return
FALSE
;
if
(
!
SetupQueueCopyIndirectW
(
&
params
))
goto
end
;
}
while
(
SetupFindNextLine
(
&
context
,
&
context
));
return
TRUE
;
ret
=
TRUE
;
end:
HeapFree
(
GetProcessHeap
(),
0
,
dest_dir
);
return
ret
;
}
...
...
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