Don't empty the DriverObject extension if it is already initialized and
filled
Modified: trunk/reactos/ntoskrnl/io/driver.c
_____
Modified: trunk/reactos/ntoskrnl/io/driver.c
--- trunk/reactos/ntoskrnl/io/driver.c 2005-05-17 17:28:40 UTC (rev
15378)
+++ trunk/reactos/ntoskrnl/io/driver.c 2005-05-17 17:39:50 UTC (rev
15379)
@@ -217,7 +217,15 @@
{
return Status;
}
-
+
+ if (Status == STATUS_OBJECT_EXISTS)
+ {
+ /* The driver object already exists, so it is already
+ * initialized. Don't initialize it once more. */
+ *DriverObject = Object;
+ return STATUS_SUCCESS;
+ }
+
/* Create driver extension */
Object->DriverExtension = (PDRIVER_EXTENSION)
ExAllocatePoolWithTag(