[NTOSKNRL]

Add a missing NULL check in IoShutdownSystem

svn path=/trunk/; revision=56939
This commit is contained in:
Timo Kreuzer 2012-07-22 18:48:09 +00:00
parent dd12f74611
commit 189a83fdde

View file

@ -167,12 +167,15 @@ IoShutdownSystem(IN ULONG Phase)
NULL, NULL,
&Event, &Event,
&StatusBlock); &StatusBlock);
if (Irp)
{
Status = IoCallDriver(DeviceObject, Irp); Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING) if (Status == STATUS_PENDING)
{ {
/* Wait on the driver */ /* Wait on the driver */
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
} }
}
/* Remove the flag */ /* Remove the flag */
ShutdownEntry->DeviceObject->Flags &= ~DO_SHUTDOWN_REGISTERED; ShutdownEntry->DeviceObject->Flags &= ~DO_SHUTDOWN_REGISTERED;