Commit 36b85d02 authored by Alexandre Julliard's avatar Alexandre Julliard

Clear the process handle table before releasing it to avoid potential

problems with destructors trying to access handles.
parent 8ba32b3f
...@@ -602,12 +602,14 @@ void kill_console_processes( struct thread *renderer, int exit_code ) ...@@ -602,12 +602,14 @@ void kill_console_processes( struct thread *renderer, int exit_code )
/* a process has been killed (i.e. its last thread died) */ /* a process has been killed (i.e. its last thread died) */
static void process_killed( struct process *process ) static void process_killed( struct process *process )
{ {
struct handle_table *handles;
struct list *ptr; struct list *ptr;
assert( list_empty( &process->thread_list )); assert( list_empty( &process->thread_list ));
gettimeofday( &process->end_time, NULL ); gettimeofday( &process->end_time, NULL );
if (process->handles) release_object( process->handles ); handles = process->handles;
process->handles = NULL; process->handles = NULL;
if (handles) release_object( handles );
/* close the console attached to this process, if any */ /* close the console attached to this process, if any */
free_console( process ); free_console( process );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment