diff --git a/reactos/ntoskrnl/io/iomgr/controller.c b/reactos/ntoskrnl/io/iomgr/controller.c index 5f738a593af..0ab410553cc 100644 --- a/reactos/ntoskrnl/io/iomgr/controller.c +++ b/reactos/ntoskrnl/io/iomgr/controller.c @@ -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);