https://git.reactos.org/?p=reactos.git;a=commitdiff;h=848f7bb687b77de1302b013765e486d864ea31c6

commit 848f7bb687b77de1302b013765e486d864ea31c6
Author:     Pierre Schweitzer <[email protected]>
AuthorDate: Sat Jun 1 13:59:13 2019 +0200
Commit:     Pierre Schweitzer <[email protected]>
CommitDate: Sat Jun 1 13:59:13 2019 +0200

    [NTOSKRNL] On device map freeing, make directory object temporary again
---
 ntoskrnl/ob/devicemap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ntoskrnl/ob/devicemap.c b/ntoskrnl/ob/devicemap.c
index 8cda474a38d..dd501f134f8 100644
--- a/ntoskrnl/ob/devicemap.c
+++ b/ntoskrnl/ob/devicemap.c
@@ -189,7 +189,8 @@ ObfDereferenceDeviceMap(IN PDEVICE_MAP DeviceMap)
     KeReleaseGuardedMutex(&ObpDeviceMapLock);
 
     /* Dereference the DOS Devices Directory and free the Device Map */
-    ObDereferenceObject(DeviceMap->DosDevicesDirectory );
+    ObMakeTemporaryObject(DeviceMap->DosDevicesDirectory);
+    ObDereferenceObject(DeviceMap->DosDevicesDirectory);
     ExFreePoolWithTag(DeviceMap, 'mDbO');
 }
 

Reply via email to