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