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
736fdbde
Commit
736fdbde
authored
Mar 30, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Mar 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Add a helper to free a printer entry.
parent
2f78666a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
info.c
dlls/winspool.drv/info.c
+10
-7
No files found.
dlls/winspool.drv/info.c
View file @
736fdbde
...
...
@@ -773,6 +773,14 @@ static LPCWSTR get_basename_from_name(LPCWSTR name)
return
name
;
}
static
void
free_printer_entry
(
opened_printer_t
*
printer
)
{
/* the queue is shared, so don't free that here */
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
printername
);
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
printer
);
}
/******************************************************************
* get_opened_printer_entry
* Get the first place empty in the opened printer table
...
...
@@ -883,11 +891,8 @@ static HANDLE get_opened_printer_entry(LPWSTR name, LPPRINTER_DEFAULTSW pDefault
end:
LeaveCriticalSection
(
&
printer_handles_cs
);
if
(
!
handle
&&
printer
)
{
/* Something failed: Free all resources */
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
printername
);
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
name
);
if
(
!
queue
)
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
queue
);
HeapFree
(
GetProcessHeap
(),
0
,
printer
);
free_printer_entry
(
printer
);
}
return
(
HANDLE
)
handle
;
...
...
@@ -2722,9 +2727,7 @@ BOOL WINAPI ClosePrinter(HANDLE hPrinter)
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
queue
);
}
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
printername
);
HeapFree
(
GetProcessHeap
(),
0
,
printer
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
printer
);
free_printer_entry
(
printer
);
printer_handles
[
i
-
1
]
=
NULL
;
ret
=
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