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
14158bb5
Commit
14158bb5
authored
Nov 27, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32/tests: Use CRT allocation functions.
parent
1967d7cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
fontdlg.c
dlls/comdlg32/tests/fontdlg.c
+2
-2
itemdlg.c
dlls/comdlg32/tests/itemdlg.c
+2
-2
printdlg.c
dlls/comdlg32/tests/printdlg.c
+10
-11
No files found.
dlls/comdlg32/tests/fontdlg.c
View file @
14158bb5
...
...
@@ -57,14 +57,14 @@ static HDC get_printer_ic(void)
if
(
info_size
==
0
)
return
NULL
;
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
info_size
);
info
=
malloc
(
info_size
);
ret
=
EnumPrintersA
(
PRINTER_ENUM_LOCAL
,
NULL
,
2
,
(
LPBYTE
)
info
,
info_size
,
&
info_size
,
&
num_printers
);
if
(
ret
)
result
=
CreateICA
(
info
->
pDriverName
,
info
->
pPrinterName
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
free
(
info
);
return
result
;
}
...
...
dlls/comdlg32/tests/itemdlg.c
View file @
14158bb5
...
...
@@ -150,7 +150,7 @@ static ULONG WINAPI IFileDialogEvents_fnRelease(IFileDialogEvents *iface)
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
free
(
This
);
return
ref
;
}
...
...
@@ -325,7 +325,7 @@ static IFileDialogEvents *IFileDialogEvents_Constructor(void)
{
IFileDialogEventsImpl
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IFileDialogEventsImpl
));
This
=
calloc
(
1
,
sizeof
(
IFileDialogEventsImpl
));
This
->
IFileDialogEvents_iface
.
lpVtbl
=
&
vt_IFileDialogEvents
;
This
->
ref
=
1
;
...
...
dlls/comdlg32/tests/printdlg.c
View file @
14158bb5
...
...
@@ -59,7 +59,7 @@ static void test_PageSetupDlgA(void)
LPPAGESETUPDLGA
pDlg
;
DWORD
res
;
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PAGESETUPDLGA
))
*
2
);
pDlg
=
malloc
(
(
sizeof
(
PAGESETUPDLGA
))
*
2
);
if
(
!
pDlg
)
return
;
SetLastError
(
0xdeadbeef
);
...
...
@@ -97,7 +97,7 @@ static void test_PageSetupDlgA(void)
if
(
!
res
&&
(
CommDlgExtendedError
()
==
PDERR_NODEFAULTPRN
))
{
skip
(
"No printer configured.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
return
;
}
...
...
@@ -108,8 +108,7 @@ static void test_PageSetupDlgA(void)
GlobalFree
(
pDlg
->
hDevMode
);
GlobalFree
(
pDlg
->
hDevNames
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
}
/* ########################### */
...
...
@@ -138,7 +137,7 @@ static void test_PrintDlgA(void)
LPSTR
ptr
;
DEVMODEA
*
dm
;
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PRINTDLGA
))
*
2
);
pDlg
=
malloc
(
(
sizeof
(
PRINTDLGA
))
*
2
);
if
(
!
pDlg
)
return
;
...
...
@@ -178,7 +177,7 @@ static void test_PrintDlgA(void)
if
(
!
res
&&
(
CommDlgExtendedError
()
==
PDERR_NODEFAULTPRN
))
{
skip
(
"No printer configured.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
return
;
}
...
...
@@ -269,7 +268,7 @@ static void test_PrintDlgA(void)
GlobalFree
(
pDlg
->
hDevNames
);
}
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
}
/* ########################### */
...
...
@@ -390,7 +389,7 @@ static void test_PrintDlgExW(void)
res
,
GetLastError
(),
CommDlgExtendedError
()
);
}
pDlg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
sizeof
(
PRINTDLGEXW
)
)
+
8
);
pDlg
=
malloc
(
sizeof
(
PRINTDLGEXW
)
+
8
);
if
(
!
pDlg
)
return
;
/* lStructSize must be exact */
...
...
@@ -471,7 +470,7 @@ static void test_PrintDlgExW(void)
if
(
res
==
E_FAIL
)
{
skip
(
"No printer configured.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
return
;
}
...
...
@@ -533,7 +532,7 @@ static void test_PrintDlgExW(void)
if
(
!
winetest_interactive
)
{
skip
(
"interactive PrintDlgEx tests (set WINETEST_INTERACTIVE=1)
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
return
;
}
...
...
@@ -552,7 +551,7 @@ static void test_PrintDlgExW(void)
GlobalFree
(
pDlg
->
hDevNames
);
DeleteDC
(
pDlg
->
hDC
);
HeapFree
(
GetProcessHeap
(),
0
,
pDlg
);
free
(
pDlg
);
}
static
BOOL
abort_proc_called
=
FALSE
;
...
...
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