[NTOS]: Bugfixes for the I/O Controller Object.
authorSir Richard <sir_richard@svn.reactos.org>
Tue, 23 Nov 2010 16:32:56 +0000 (16:32 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Tue, 23 Nov 2010 16:32:56 +0000 (16:32 +0000)
svn path=/trunk/; revision=49726

reactos/ntoskrnl/io/iomgr/controller.c

index 5f738a5..0ab4105 100644 (file)
@@ -63,7 +63,11 @@ IoCreateController(IN ULONG Size)
    PAGED_CODE();
 
    /* Initialize an empty OBA */
-   InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
+   InitializeObjectAttributes(&ObjectAttributes,
+                              NULL,
+                              OBJ_KERNEL_HANDLE,
+                              NULL,
+                              NULL);
 
    /* Create the Object */
    Status = ObCreateObject(KernelMode,
@@ -87,7 +91,7 @@ IoCreateController(IN ULONG Size)
    if (!NT_SUCCESS(Status)) return NULL;
 
     /* Close the dummy handle */
-    NtClose(Handle);
+    ObCloseHandle(Handle, KernelMode);
 
     /* Zero the Object and set its data */
     RtlZeroMemory(Controller, sizeof(CONTROLLER_OBJECT) + Size);