Reference the PDO before returning it
Modified: trunk/reactos/ntoskrnl/io/plugplay.c
_____
Modified: trunk/reactos/ntoskrnl/io/plugplay.c
--- trunk/reactos/ntoskrnl/io/plugplay.c 2005-10-03 09:14:57 UTC
(rev 18240)
+++ trunk/reactos/ntoskrnl/io/plugplay.c 2005-10-03 10:13:28 UTC
(rev 18241)
@@ -231,7 +231,10 @@
if (RtlEqualUnicodeString(&Node->InstancePath,
DeviceInstance, TRUE))
+ {
+ ObReferenceObject(Node->PhysicalDeviceObject);
return Node->PhysicalDeviceObject;
+ }
/* Traversal of all children nodes */
for (ChildNode = Node->Child;