ntoskrnl.exe: Don't use irp after it has been freed by IoCompleteRequest (Coverity).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2019-08-18 13:11:26 +02:00 committed by Alexandre Julliard
parent 60d668631f
commit aa10b49c57
1 changed files with 3 additions and 1 deletions

View File

@ -725,6 +725,7 @@ static NTSTATUS WINAPI pnp_manager_device_pnp( DEVICE_OBJECT *device, IRP *irp )
{
IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation( irp );
struct root_pnp_device *root_device = device->DeviceExtension;
NTSTATUS status;
TRACE("device %p, irp %p, minor function %#x.\n", device, irp, stack->MinorFunction);
@ -783,8 +784,9 @@ static NTSTATUS WINAPI pnp_manager_device_pnp( DEVICE_OBJECT *device, IRP *irp )
FIXME("Unhandled PnP request %#x.\n", stack->MinorFunction);
}
status = irp->IoStatus.u.Status;
IoCompleteRequest( irp, IO_NO_INCREMENT );
return irp->IoStatus.u.Status;
return status;
}
static NTSTATUS WINAPI pnp_manager_driver_entry( DRIVER_OBJECT *driver, UNICODE_STRING *keypath )