Reference the PDO before returning it

svn path=/trunk/; revision=18241
This commit is contained in:
Hervé Poussineau 2005-10-03 10:13:28 +00:00
parent 5a455c2aa3
commit aa1f470e40

View file

@ -231,7 +231,10 @@ IopTraverseDeviceNode(PDEVICE_NODE Node, PUNICODE_STRING DeviceInstance)
if (RtlEqualUnicodeString(&Node->InstancePath,
DeviceInstance, TRUE))
{
ObReferenceObject(Node->PhysicalDeviceObject);
return Node->PhysicalDeviceObject;
}
/* Traversal of all children nodes */
for (ChildNode = Node->Child;