[COMPBATT] Assign a memory allocation tag for the I/O remove lock

IoInitializeRemoveLock expects an allocation tag to be provided when it allocates debug data in the kernel.
Passing 0 leads to a bunch of ASSERTs in the kernel as such data is allocated by ExAllocatePoolWithTag of which a tag has to be supplied, it's not optional.
This commit is contained in:
George Bișoc 2024-12-14 21:52:24 +01:00
parent 3346301777
commit 28bb8c6ff7
No known key found for this signature in database
GPG key ID: 688C4FBE25D7DEF6

View file

@ -177,7 +177,7 @@ CompBattAddNewBattery(
ExReleaseFastMutex(&DeviceExtension->Lock);
/* Initialize the work item and delete lock */
IoInitializeRemoveLock(&BatteryData->RemoveLock, 0, 0, 0);
IoInitializeRemoveLock(&BatteryData->RemoveLock, COMPBATT_TAG, 0, 0);
ExInitializeWorkItem(&BatteryData->WorkItem,
(PVOID)CompBattMonitorIrpCompleteWorker,
BatteryData);