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
0e2e9e4e
Commit
0e2e9e4e
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 descriptor on error in create_thread function.
parent
3d3c9278
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
thread.c
server/thread.c
+7
-1
No files found.
server/thread.c
View file @
0e2e9e4e
...
@@ -219,11 +219,16 @@ struct thread *create_thread( int fd, struct process *process )
...
@@ -219,11 +219,16 @@ struct thread *create_thread( int fd, struct process *process )
if
(
process
->
is_terminating
)
if
(
process
->
is_terminating
)
{
{
close
(
fd
);
set_error
(
STATUS_PROCESS_IS_TERMINATING
);
set_error
(
STATUS_PROCESS_IS_TERMINATING
);
return
NULL
;
return
NULL
;
}
}
if
(
!
(
thread
=
alloc_object
(
&
thread_ops
)))
return
NULL
;
if
(
!
(
thread
=
alloc_object
(
&
thread_ops
)))
{
close
(
fd
);
return
NULL
;
}
init_thread_structure
(
thread
);
init_thread_structure
(
thread
);
...
@@ -236,6 +241,7 @@ struct thread *create_thread( int fd, struct process *process )
...
@@ -236,6 +241,7 @@ struct thread *create_thread( int fd, struct process *process )
if
(
!
(
thread
->
id
=
alloc_ptid
(
thread
)))
if
(
!
(
thread
->
id
=
alloc_ptid
(
thread
)))
{
{
close
(
fd
);
release_object
(
thread
);
release_object
(
thread
);
return
NULL
;
return
NULL
;
}
}
...
...
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