From a7def7a995d1700d66ba56a6fe325d03d305f059 Mon Sep 17 00:00:00 2001 From: ami-GS <1991.daiki@gmail.com> Date: Tue, 21 Jan 2025 07:41:38 -0800 Subject: [PATCH] use InitializeObjectAttributes --- src/inc/quic_platform_winkernel.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/inc/quic_platform_winkernel.h b/src/inc/quic_platform_winkernel.h index 0745a00325..0f8db3130b 100644 --- a/src/inc/quic_platform_winkernel.h +++ b/src/inc/quic_platform_winkernel.h @@ -544,7 +544,15 @@ CxPlatEventQInitialize( _Out_ CXPLAT_EVENTQ* queue ) { - return NT_SUCCESS(ZwCreateIoCompletion(queue, IO_COMPLETION_ALL_ACCESS, NULL, 0)); + OBJECT_ATTRIBUTES KernelObjectAttributes; + + InitializeObjectAttributes(&KernelObjectAttributes, + /* ObjectName */ NULL, + /* AttributesFlag */ OBJ_KERNEL_HANDLE, + /* RootDirectory */ NULL, + /* SecurityAttributes */ NULL); + + return NT_SUCCESS(ZwCreateIoCompletion(queue, IO_COMPLETION_ALL_ACCESS, &KernelObjectAttributes, 0)); } _IRQL_requires_max_(PASSIVE_LEVEL)