This commit is contained in:
Bill Zissimopoulos
2015-11-30 11:10:48 -08:00
parent b52947db34
commit f188bddb3b
3 changed files with 9 additions and 19 deletions

View File

@ -192,9 +192,15 @@ static NTSTATUS FspFsctlMountVolume(
Result = STATUS_UNRECOGNIZED_VOLUME;
goto exit;
}
if (FspDeviceDeleted(FsvrtDeviceObject) || FsvrtDeviceExtension->Deleted ||
if (!FspDeviceRetain(FsvrtDeviceObject))
{
Result = STATUS_UNRECOGNIZED_VOLUME;
goto exit;
}
if (FsvrtDeviceExtension->Deleted ||
FILE_DEVICE_VIRTUAL_DISK != FsvrtDeviceObject->DeviceType)
{
FspDeviceRelease(FsvrtDeviceObject);
Result = STATUS_UNRECOGNIZED_VOLUME;
goto exit;
}
@ -215,6 +221,8 @@ static NTSTATUS FspFsctlMountVolume(
Irp->IoStatus.Information = 0;
}
FspDeviceRelease(FsvrtDeviceObject);
exit:;
}
finally