From 36b85d02f61171076e32eb670ecb9bd76ca7f70f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 29 Jun 2005 19:29:15 +0000 Subject: [PATCH] Clear the process handle table before releasing it to avoid potential problems with destructors trying to access handles. --- server/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/process.c b/server/process.c index 37ab40c4cae..863c41588c8 100644 --- a/server/process.c +++ b/server/process.c @@ -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 ); -- 2.11.4.GIT