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
350c0cab
Commit
350c0cab
authored
Aug 24, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Always free the process handle table even if the process didn't start.
parent
3557b981
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
handle.c
server/handle.c
+9
-0
handle.h
server/handle.h
+1
-0
process.c
server/process.c
+2
-4
No files found.
server/handle.c
View file @
350c0cab
...
...
@@ -171,6 +171,15 @@ static void handle_table_destroy( struct object *obj )
free
(
table
->
entries
);
}
/* close all the process handles and free the handle table */
void
close_process_handles
(
struct
process
*
process
)
{
struct
handle_table
*
table
=
process
->
handles
;
process
->
handles
=
NULL
;
if
(
table
)
release_object
(
table
);
}
/* allocate a new handle table */
struct
handle_table
*
alloc_handle_table
(
struct
process
*
process
,
int
count
)
{
...
...
server/handle.h
View file @
350c0cab
...
...
@@ -49,6 +49,7 @@ extern obj_handle_t open_object( const struct namespace *namespace, const struct
extern
obj_handle_t
find_inherited_handle
(
struct
process
*
process
,
const
struct
object_ops
*
ops
);
extern
obj_handle_t
enumerate_handles
(
struct
process
*
process
,
const
struct
object_ops
*
ops
,
unsigned
int
*
index
);
extern
void
close_process_handles
(
struct
process
*
process
);
extern
struct
handle_table
*
alloc_handle_table
(
struct
process
*
process
,
int
count
);
extern
struct
handle_table
*
copy_handle_table
(
struct
process
*
process
,
struct
process
*
parent
);
extern
unsigned
int
get_handle_table_count
(
struct
process
*
process
);
...
...
server/process.c
View file @
350c0cab
...
...
@@ -416,6 +416,7 @@ static void process_destroy( struct object *obj )
assert
(
!
process
->
sigkill_timeout
);
/* timeout should hold a reference to the process */
close_process_handles
(
process
);
set_process_startup_state
(
process
,
STARTUP_ABORTED
);
if
(
process
->
console
)
release_object
(
process
->
console
);
if
(
process
->
parent
)
release_object
(
process
->
parent
);
...
...
@@ -615,15 +616,12 @@ void kill_console_processes( struct thread *renderer, int exit_code )
/* a process has been killed (i.e. its last thread died) */
static
void
process_killed
(
struct
process
*
process
)
{
struct
handle_table
*
handles
;
struct
list
*
ptr
;
assert
(
list_empty
(
&
process
->
thread_list
));
process
->
end_time
=
current_time
;
if
(
!
process
->
is_system
)
close_process_desktop
(
process
);
handles
=
process
->
handles
;
process
->
handles
=
NULL
;
if
(
handles
)
release_object
(
handles
);
close_process_handles
(
process
);
process
->
winstation
=
0
;
process
->
desktop
=
0
;
if
(
process
->
idle_event
)
...
...
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