From aa1f470e408d2cb3617429c6bbddcb75038edbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 3 Oct 2005 10:13:28 +0000 Subject: [PATCH] Reference the PDO before returning it svn path=/trunk/; revision=18241 --- reactos/ntoskrnl/io/plugplay.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index 02532b9c25d..46a6c69cb6d 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -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;