Commit a37ee1e2 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

wineps: Fix a memory leak.

parent e31cfb0b
......@@ -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));
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment