[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,11 +167,14 @@ IoShutdownSystem(IN ULONG Phase)
NULL,
&Event,
&StatusBlock);
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
if (Irp)
{
/* Wait on the driver */
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{
/* Wait on the driver */
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
}
}
/* Remove the flag */