Grab the thread object in case the thread terminates with pending

async requests (spotted by Andreas Mohr).
This commit is contained in:
Alexandre Julliard 2003-01-08 19:54:19 +00:00
parent 632d0c2df0
commit 08016dc38a
1 changed files with 2 additions and 3 deletions

View File

@ -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);
}