[COMPBATT] Add a missing OBJ_KERNEL_HANDLE

CORE-10207
This commit is contained in:
Serge Gautherie 2020-09-09 03:46:56 +02:00 committed by Thomas Faber
parent b910409a4a
commit 33714797f4
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -84,7 +84,11 @@ CompBattGetDeviceObjectPointer(IN PUNICODE_STRING DeviceName,
PAGED_CODE();
/* Open a file object handle to the device */
InitializeObjectAttributes(&ObjectAttributes, DeviceName, 0, NULL, NULL);
InitializeObjectAttributes(&ObjectAttributes,
DeviceName,
OBJ_KERNEL_HANDLE,
NULL,
NULL);
Status = ZwCreateFile(&DeviceHandle,
DesiredAccess,
&ObjectAttributes,