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
9aad600d
Commit
9aad600d
authored
Nov 20, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Always remove inflight fd if alloc_console fails.
parent
d00e8ebd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
console.c
server/console.c
+17
-10
No files found.
server/console.c
View file @
9aad600d
...
...
@@ -1392,6 +1392,16 @@ DECL_HANDLER(alloc_console)
int
fd
;
int
attach
=
0
;
if
(
req
->
input_fd
!=
-
1
)
{
if
((
fd
=
thread_get_inflight_fd
(
current
,
req
->
input_fd
))
==
-
1
)
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
;
}
}
else
fd
=
-
1
;
switch
(
req
->
pid
)
{
case
0
:
...
...
@@ -1399,6 +1409,7 @@ DECL_HANDLER(alloc_console)
renderer
=
current
;
if
(
!
(
process
=
current
->
process
->
parent
))
{
if
(
fd
!=
-
1
)
close
(
fd
);
set_error
(
STATUS_ACCESS_DENIED
);
return
;
}
...
...
@@ -1415,23 +1426,19 @@ DECL_HANDLER(alloc_console)
default
:
/* renderer is current, console to be attached to req->pid */
renderer
=
current
;
if
(
!
(
process
=
get_process_from_id
(
req
->
pid
)))
return
;
if
(
!
(
process
=
get_process_from_id
(
req
->
pid
)))
{
if
(
fd
!=
-
1
)
close
(
fd
);
return
;
}
}
if
(
attach
&&
process
->
console
)
{
if
(
fd
!=
-
1
)
close
(
fd
);
set_error
(
STATUS_ACCESS_DENIED
);
goto
the_end
;
}
if
(
req
->
input_fd
!=
-
1
)
{
if
((
fd
=
thread_get_inflight_fd
(
current
,
req
->
input_fd
))
==
-
1
)
{
set_error
(
STATUS_INVALID_PARAMETER
);
goto
the_end
;
}
}
else
fd
=
-
1
;
if
((
console
=
(
struct
console_input
*
)
create_console_input
(
renderer
,
fd
)))
{
...
...
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