Do not free the handles once they have been sent to the client (thanks

to Jeremy White).
This commit is contained in:
Alexandre Julliard 1999-11-07 23:59:08 +00:00
parent cd168e779d
commit c61eb035e3
1 changed files with 19 additions and 14 deletions

View File

@ -102,21 +102,26 @@ static int fill_debug_event( struct thread *debugger, struct thread *thread,
/* free a debug event structure */
static void free_event( struct thread *debugger, struct debug_event *event )
{
switch(event->code)
/* If the event has been sent already, the handles are now under the */
/* responsibility of the debugger process, so we don't touch them */
if (!event->sent)
{
case CREATE_THREAD_DEBUG_EVENT:
close_handle( debugger->process, event->data.create_thread.handle );
break;
case CREATE_PROCESS_DEBUG_EVENT:
if (event->data.create_process.file != -1)
close_handle( debugger->process, event->data.create_process.file );
close_handle( debugger->process, event->data.create_process.thread );
close_handle( debugger->process, event->data.create_process.process );
break;
case LOAD_DLL_DEBUG_EVENT:
if (event->data.load_dll.handle != -1)
close_handle( debugger->process, event->data.load_dll.handle );
break;
switch(event->code)
{
case CREATE_THREAD_DEBUG_EVENT:
close_handle( debugger->process, event->data.create_thread.handle );
break;
case CREATE_PROCESS_DEBUG_EVENT:
if (event->data.create_process.file != -1)
close_handle( debugger->process, event->data.create_process.file );
close_handle( debugger->process, event->data.create_process.thread );
close_handle( debugger->process, event->data.create_process.process );
break;
case LOAD_DLL_DEBUG_EVENT:
if (event->data.load_dll.handle != -1)
close_handle( debugger->process, event->data.load_dll.handle );
break;
}
}
event->thread->debug_event = NULL;
release_object( event->thread );