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
a37ee1e2
Commit
a37ee1e2
authored
Apr 04, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Apr 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Fix a memory leak.
parent
e31cfb0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
driver.c
dlls/wineps.drv/driver.c
+12
-8
psdrv.h
dlls/wineps.drv/psdrv.h
+0
-5
No files found.
dlls/wineps.drv/driver.c
View file @
a37ee1e2
...
...
@@ -179,6 +179,12 @@ void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
}
typedef
struct
{
PRINTERINFO
*
pi
;
PSDRV_DEVMODEA
*
dlgdm
;
}
PSDRV_DLGINFO
;
/****************************************************************
* PSDRV_PaperDlgProc
*
...
...
@@ -360,8 +366,8 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
HPROPSHEETPAGE
hpsp
[
1
];
PROPSHEETPAGEW
psp
;
PROPSHEETHEADERW
psh
;
PSDRV_DLGINFO
*
di
;
PSDRV_DEVMODEA
*
dlgdm
;
PSDRV_DLGINFO
di
;
PSDRV_DEVMODEA
dlgdm
;
static
const
WCHAR
PAPERW
[]
=
{
'P'
,
'A'
,
'P'
,
'E'
,
'R'
,
'\0'
};
static
const
WCHAR
SetupW
[]
=
{
'S'
,
'e'
,
't'
,
'u'
,
'p'
,
'\0'
};
...
...
@@ -372,17 +378,15 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
"CreatePropertySheetPageW"
);
pPropertySheet
=
(
void
*
)
GetProcAddress
(
hinstComctl32
,
"PropertySheetW"
);
memset
(
&
psp
,
0
,
sizeof
(
psp
));
dlgdm
=
HeapAlloc
(
PSDRV_Heap
,
0
,
sizeof
(
*
dlgdm
)
);
*
dlgdm
=
*
pi
->
Devmode
;
di
=
HeapAlloc
(
PSDRV_Heap
,
0
,
sizeof
(
*
di
)
);
di
->
pi
=
pi
;
di
->
dlgdm
=
dlgdm
;
dlgdm
=
*
pi
->
Devmode
;
di
.
pi
=
pi
;
di
.
dlgdm
=
&
dlgdm
;
psp
.
dwSize
=
sizeof
(
psp
);
psp
.
hInstance
=
PSDRV_hInstance
;
psp
.
u
.
pszTemplate
=
PAPERW
;
psp
.
u2
.
pszIcon
=
NULL
;
psp
.
pfnDlgProc
=
PSDRV_PaperDlgProc
;
psp
.
lParam
=
(
LPARAM
)
di
;
psp
.
lParam
=
(
LPARAM
)
&
di
;
hpsp
[
0
]
=
pCreatePropertySheetPage
(
&
psp
);
memset
(
&
psh
,
0
,
sizeof
(
psh
));
...
...
dlls/wineps.drv/psdrv.h
View file @
a37ee1e2
...
...
@@ -385,11 +385,6 @@ typedef struct
int
pathdepth
;
}
PSDRV_PDEVICE
;
typedef
struct
{
PRINTERINFO
*
pi
;
PSDRV_DEVMODEA
*
dlgdm
;
}
PSDRV_DLGINFO
;
static
inline
PSDRV_PDEVICE
*
get_psdrv_dev
(
PHYSDEV
dev
)
{
return
(
PSDRV_PDEVICE
*
)
dev
;
...
...
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