sys: FspIopCompleteIrpEx:

- only update statistics if we actually have a reference to the DeviceObject
This commit is contained in:
Bill Zissimopoulos 2016-12-30 15:36:06 -08:00
parent c9485ff214
commit 8f25dd6cab

View File

@ -287,6 +287,9 @@ VOID FspIopCompleteIrpEx(PIRP Irp, NTSTATUS Result, BOOLEAN DeviceDereference)
* We update the Create statistics here to avoid doing it in multiple places. * We update the Create statistics here to avoid doing it in multiple places.
*/ */
if (IRP_MJ_CREATE == IrpSp->MajorFunction) if (IRP_MJ_CREATE == IrpSp->MajorFunction)
{
/* only update statistics if we actually have a reference to the DeviceObject */
if (DeviceDereference)
{ {
FSP_DEVICE_EXTENSION *DeviceExtension = FspDeviceExtension(DeviceObject); FSP_DEVICE_EXTENSION *DeviceExtension = FspDeviceExtension(DeviceObject);
@ -302,6 +305,7 @@ VOID FspIopCompleteIrpEx(PIRP Irp, NTSTATUS Result, BOOLEAN DeviceDereference)
FspStatisticsInc(Statistics, Specific.FailedCreates); FspStatisticsInc(Statistics, Specific.FailedCreates);
} }
} }
}
else else
/* /*
* HACK: * HACK: