server: Fix possible NULL dereference.

This commit is contained in:
Alexandre Julliard 2007-12-18 19:44:00 +01:00
parent 3afbee5218
commit c69468ddcc
1 changed files with 2 additions and 1 deletions

View File

@ -213,7 +213,8 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
async->data = *data;
async->timeout = NULL;
async->queue = (struct async_queue *)grab_object( queue );
fd_assign_completion( queue->fd, &async->completion, &async->comp_key );
async->completion = NULL;
if (queue->fd) fd_assign_completion( queue->fd, &async->completion, &async->comp_key );
list_add_tail( &queue->queue, &async->queue_entry );
grab_object( async );