server: Remove IRP from device queue before terminating async.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-05-28 14:09:59 +02:00 committed by Alexandre Julliard
parent 101da2b512
commit dc5421f950
1 changed files with 3 additions and 2 deletions

View File

@ -378,6 +378,9 @@ static void set_irp_result( struct irp_call *irp, unsigned int status,
iosb->out_size = min( iosb->out_size, out_size );
if (iosb->out_size && !(iosb->out_data = memdup( out_data, iosb->out_size )))
iosb->out_size = 0;
/* remove it from the device queue */
list_remove( &irp->dev_entry );
irp->file = NULL;
if (irp->async)
{
@ -388,8 +391,6 @@ static void set_irp_result( struct irp_call *irp, unsigned int status,
}
wake_up( &irp->obj, 0 );
/* remove it from the device queue */
list_remove( &irp->dev_entry );
release_object( irp ); /* no longer on the device queue */
release_object( file );
}