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
f8a0d965
Commit
f8a0d965
authored
Nov 22, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Correctly free data allocated with GdiConvertToDevmodeW.
parent
020e2b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
info.c
dlls/winspool.drv/info.c
+7
-7
No files found.
dlls/winspool.drv/info.c
View file @
f8a0d965
...
...
@@ -1748,7 +1748,7 @@ static void free_printer_info( void *data, DWORD level )
free
(
piW
->
pDriverName
);
free
(
piW
->
pComment
);
free
(
piW
->
pLocation
);
free
(
piW
->
pDevMode
);
heap_
free
(
piW
->
pDevMode
);
free
(
piW
->
pSepFile
);
free
(
piW
->
pPrintProcessor
);
free
(
piW
->
pDatatype
);
...
...
@@ -1761,7 +1761,7 @@ static void free_printer_info( void *data, DWORD level )
{
PRINTER_INFO_9W
*
piW
=
(
PRINTER_INFO_9W
*
)
data
;
free
(
piW
->
pDevMode
);
heap_
free
(
piW
->
pDevMode
);
break
;
}
...
...
@@ -1827,7 +1827,7 @@ INT WINAPI DeviceCapabilitiesA(const char *device, const char *portA, WORD cap,
}
cleanup:
free
(
device_name
);
free
(
devmode
);
heap_
free
(
devmode
);
free
(
port
);
return
ret
;
}
...
...
@@ -1893,7 +1893,7 @@ LONG WINAPI DocumentPropertiesA(HWND hwnd, HANDLE printer, char *device_name, DE
DEVMODEWtoA
(
outputW
,
output
);
free
(
device
);
free
(
inputW
);
heap_
free
(
inputW
);
free
(
outputW
);
if
(
!
mode
&&
ret
>
0
)
ret
-=
CCHDEVICENAME
+
CCHFORMNAME
;
...
...
@@ -2113,7 +2113,7 @@ BOOL WINAPI OpenPrinter2A(LPSTR name, HANDLE *printer,
if
(
p_defaultsW
)
{
RtlFreeUnicodeString
(
&
datatypeU
);
free
(
defaultsW
.
pDevMode
);
heap_
free
(
defaultsW
.
pDevMode
);
}
RtlFreeUnicodeString
(
&
nameU
);
...
...
@@ -3197,7 +3197,7 @@ BOOL WINAPI SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level,
free
(
info2W
->
pDatatype
);
free
(
info2W
->
pPrintProcessor
);
free
(
info2W
->
pParameters
);
free
(
info2W
->
pDevMode
);
heap_
free
(
info2W
->
pDevMode
);
free
(
info2W
->
pStatus
);
break
;
}
...
...
@@ -3677,7 +3677,7 @@ static BOOL WINSPOOL_GetDevModeFromReg(HKEY hkey, LPCWSTR ValueName,
if
(
ptr
&&
(
buflen
>=
sz
))
{
DEVMODEW
*
dmW
=
GdiConvertToDevmodeW
((
DEVMODEA
*
)
ptr
);
memcpy
(
ptr
,
dmW
,
sz
);
free
(
dmW
);
heap_
free
(
dmW
);
}
*
needed
=
sz
;
return
TRUE
;
...
...
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