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
78ef7c34
Commit
78ef7c34
authored
Jun 06, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Fix memory leak in lpr_start_doc (scan-build).
parent
486531ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
cups.c
dlls/localspl/cups.c
+4
-1
No files found.
dlls/localspl/cups.c
View file @
78ef7c34
...
...
@@ -219,12 +219,15 @@ static BOOL lpr_start_doc(doc_t *doc, const WCHAR *printer_name)
static
const
WCHAR
quote
[]
=
{
'\''
,
0
};
int
printer_len
=
wcslen
(
printer_name
);
WCHAR
*
cmd
;
BOOL
ret
;
cmd
=
malloc
(
printer_len
*
sizeof
(
WCHAR
)
+
sizeof
(
lpr
)
+
sizeof
(
quote
));
memcpy
(
cmd
,
lpr
,
sizeof
(
lpr
));
memcpy
(
cmd
+
ARRAY_SIZE
(
lpr
),
printer_name
,
printer_len
*
sizeof
(
WCHAR
));
memcpy
(
cmd
+
ARRAY_SIZE
(
lpr
)
+
printer_len
,
quote
,
sizeof
(
quote
));
return
pipe_start_doc
(
doc
,
cmd
);
ret
=
pipe_start_doc
(
doc
,
cmd
);
free
(
cmd
);
return
ret
;
}
#ifdef SONAME_LIBCUPS
...
...
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