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
609d43e4
Commit
609d43e4
authored
Nov 17, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Avoid leaking file descriptors if create_console_input fails.
parent
35c7ac8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
console.c
server/console.c
+8
-3
No files found.
server/console.c
View file @
609d43e4
...
...
@@ -299,7 +299,11 @@ static struct object *create_console_input( struct thread* renderer, int fd )
{
struct
console_input
*
console_input
;
if
(
!
(
console_input
=
alloc_object
(
&
console_input_ops
)))
return
NULL
;
if
(
!
(
console_input
=
alloc_object
(
&
console_input_ops
)))
{
if
(
fd
!=
-
1
)
close
(
fd
);
return
NULL
;
}
console_input
->
renderer
=
renderer
;
console_input
->
mode
=
ENABLE_PROCESSED_INPUT
|
ENABLE_LINE_INPUT
|
ENABLE_ECHO_INPUT
|
ENABLE_MOUSE_INPUT
|
ENABLE_INSERT_MODE
|
...
...
@@ -323,8 +327,9 @@ static struct object *create_console_input( struct thread* renderer, int fd )
if
(
!
console_input
->
history
||
(
renderer
&&
!
console_input
->
evt
)
||
!
console_input
->
event
)
{
release_object
(
console_input
);
return
NULL
;
if
(
fd
!=
-
1
)
close
(
fd
);
release_object
(
console_input
);
return
NULL
;
}
if
(
fd
!=
-
1
)
/* bare console */
{
...
...
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