mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[NTOSKRNL]
- Fix broken reference counting and dereferencing the wrong device object svn path=/trunk/; revision=56088
This commit is contained in:
parent
592be28128
commit
e0c8eedd51
1 changed files with 3 additions and 7 deletions
|
@ -363,15 +363,11 @@ IopShutdownBaseFileSystems(IN PLIST_ENTRY ListHead)
|
||||||
DEVICE_OBJECT,
|
DEVICE_OBJECT,
|
||||||
Queue.ListEntry);
|
Queue.ListEntry);
|
||||||
|
|
||||||
ObReferenceObject(DeviceObject);
|
|
||||||
IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount);
|
|
||||||
|
|
||||||
/* Check if we're attached */
|
|
||||||
if (DeviceObject->AttachedDevice)
|
|
||||||
{
|
|
||||||
/* Get the attached device */
|
/* Get the attached device */
|
||||||
DeviceObject = IoGetAttachedDevice(DeviceObject);
|
DeviceObject = IoGetAttachedDevice(DeviceObject);
|
||||||
}
|
|
||||||
|
ObReferenceObject(DeviceObject);
|
||||||
|
IopInterlockedIncrementUlong(LockQueueIoDatabaseLock, (PULONG)&DeviceObject->ReferenceCount);
|
||||||
|
|
||||||
/* Build the shutdown IRP and call the driver */
|
/* Build the shutdown IRP and call the driver */
|
||||||
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_SHUTDOWN,
|
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_SHUTDOWN,
|
||||||
|
|
Loading…
Reference in a new issue