From 08016dc38a4c1befe0cabb766575f768ce4c963c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 8 Jan 2003 19:54:19 +0000 Subject: [PATCH] Grab the thread object in case the thread terminates with pending async requests (spotted by Andreas Mohr). --- server/async.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/async.c b/server/async.c index 1b3448369f..5bbbb44aa1 100644 --- a/server/async.c +++ b/server/async.c @@ -56,7 +56,7 @@ void destroy_async( struct async *async ) async->q = NULL; async->next = NULL; async->prev = NULL; - + release_object( async->thread ); free(async); } @@ -127,7 +127,7 @@ struct async *create_async(struct object *obj, struct thread *thread, } async->obj = obj; - async->thread = thread; + async->thread = (struct thread *)grab_object(thread); async->overlapped = overlapped; async->next = NULL; async->prev = NULL; @@ -178,4 +178,3 @@ DECL_HANDLER(register_async) obj->ops->queue_async (obj, req->overlapped, req->status, req->type, req->count); release_object(obj); } - -- 2.32.0.93.g670b81a890