Clear the process handle table before releasing it to avoid potential

problems with destructors trying to access handles.
oldstable
Alexandre Julliard 2005-06-29 19:29:15 +00:00
parent 8ba32b3f9b
commit 36b85d02f6
1 changed files with 3 additions and 1 deletions

View File

@ -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) */
static void process_killed( struct process *process )
{
struct handle_table *handles;
struct list *ptr;
assert( list_empty( &process->thread_list ));
gettimeofday( &process->end_time, NULL );
if (process->handles) release_object( process->handles );
handles = process->handles;
process->handles = NULL;
if (handles) release_object( handles );
/* close the console attached to this process, if any */
free_console( process );