Commit aa10b49c authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

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

parent 60d66863
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment