From f3a2cf0b6a1008d8c6668e249504339cd8fa1fb3 Mon Sep 17 00:00:00 2001 From: "Filip \"Ret2Me\" Poplewski" <37419029+Ret2Me@users.noreply.github.com> Date: Sun, 17 Jul 2022 13:00:39 +0200 Subject: [PATCH] Update deprecated function. Update deprecated function ExAllocatePoolWithTag to ExAllocatePool2. MS documentation: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/updating-deprecated-exallocatepool-calls --- KernelProcessList/Driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KernelProcessList/Driver.c b/KernelProcessList/Driver.c index dba6d59..21cd0a0 100644 --- a/KernelProcessList/Driver.c +++ b/KernelProcessList/Driver.c @@ -72,7 +72,7 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) if (ZwQuerySystemInformation(SystemProcessInformation, NULL, 0, &bufferSize) == STATUS_INFO_LENGTH_MISMATCH) { if (bufferSize) { - PVOID memory = ExAllocatePoolWithTag(PagedPool, bufferSize, POOL_TAG); + PVOID memory = ExAllocatePool2(POOL_FLAG_PAGED, bufferSize, POOL_TAG); if (memory) { ntstatus = ZwQuerySystemInformation(SystemProcessInformation, memory, bufferSize, &bufferSize);