mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[NTOSKRNL]
- Fix broken reference counting and dereferencing the wrong device object svn path=/trunk/; revision=56088
This commit is contained in:
@@ -363,16 +363,12 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead)
|
||||
DEVICE_OBJECT,
|
||||
Queue.ListEntry);
|
||||
|
||||
/* Get the attached device */
|
||||
DeviceObject = IoGetAttachedDevice(DeviceObject);
|
||||
|
||||
ObReferenceObject(DeviceObject);
|
||||
IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount);
|
||||
|
||||
/* Check if we're attached */
|
||||
if (DeviceObject->AttachedDevice)
|
||||
{
|
||||
/* Get the attached device */
|
||||
DeviceObject = IoGetAttachedDevice(DeviceObject);
|
||||
}
|
||||
|
||||
/* Build the shutdown IRP and call the driver */
|
||||
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_SHUTDOWN,
|
||||
DeviceObject,
|
||||
|
||||
Reference in New Issue
Block a user