VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/VolumeFilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Driver/VolumeFilter.c')
-rw-r--r--src/Driver/VolumeFilter.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Driver/VolumeFilter.c b/src/Driver/VolumeFilter.c
index 9789fe0f..ee4b02e7 100644
--- a/src/Driver/VolumeFilter.c
+++ b/src/Driver/VolumeFilter.c
@@ -42,7 +42,12 @@ NTSTATUS VolumeFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
Extension = (VolumeFilterExtension *) filterDeviceObject->DeviceExtension;
memset (Extension, 0, sizeof (VolumeFilterExtension));
- Extension->LowerDeviceObject = IoAttachDeviceToDeviceStack (filterDeviceObject, pdo); // IoAttachDeviceToDeviceStackSafe() is not required in AddDevice routine and is also unavailable on Windows 2000 SP4
+ status = IoAttachDeviceToDeviceStackSafe (filterDeviceObject, pdo, &(Extension->LowerDeviceObject));
+ if (status != STATUS_SUCCESS)
+ {
+ goto err;
+ }
+
if (!Extension->LowerDeviceObject)
{
status = STATUS_DEVICE_REMOVED;