From 53f8cbad9799d56ec55df90eb73321ebfd022fee Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 24 Dec 2019 18:31:59 +0100 Subject: [PATCH] [NTOS:IO] Fix list enumeration in IopShutdownBaseFileSystems --- ntoskrnl/io/iomgr/volume.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c index 1d1e31e5c0d..878c0426dbd 100644 --- a/ntoskrnl/io/iomgr/volume.c +++ b/ntoskrnl/io/iomgr/volume.c @@ -371,6 +371,9 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) DEVICE_OBJECT, Queue.ListEntry); + /* Go to the next entry */ + ListEntry = ListEntry->Flink; + /* Get the attached device */ DeviceObject = IoGetAttachedDevice(DeviceObject); @@ -400,9 +403,6 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead) IopDecrementDeviceObjectRef(DeviceObject, FALSE); ObDereferenceObject(DeviceObject); - - /* Go to the next entry */ - ListEntry = ListEntry->Flink; } }