[ros-diffs] [hpoussin] 18241: Reference the PDO before returning it

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Mon Oct 3 12:13:34 CEST 2005


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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051003/1520da61/attachment.html


More information about the Ros-diffs mailing list