mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +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,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,
|
||||
|
|
Loading…
Reference in a new issue