From 94211c3b2ecac957923bbfa22031f96d8fe5e0c7 Mon Sep 17 00:00:00 2001 From: Matthew Williams Date: Tue, 28 Feb 2023 17:51:15 -0800 Subject: serenum sample: Use ExAllocatePool2 instead of ExAllocatePoolWithTag --- serial/serenum/enum.c | 4 ++-- serial/serenum/log.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/serial/serenum/enum.c b/serial/serenum/enum.c index feb6f4af..35ebe2ce 100644 --- a/serial/serenum/enum.c +++ b/serial/serenum/enum.c @@ -230,7 +230,7 @@ SerenumDoEnumProtocol( LOGENTRY(LOG_ENUM, 'SDEP', PFdoData, PpBuf, PDSRMissing); - pReadBuf = ExAllocatePoolWithTag(NonPagedPoolNx, MAX_DEVNODE_NAME + sizeof(CHAR) ,SERENUM_POOL_TAG); + pReadBuf = ExAllocatePoolZero(NonPagedPoolNx, MAX_DEVNODE_NAME + sizeof(CHAR) ,SERENUM_POOL_TAG); if (pReadBuf == NULL) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -1580,7 +1580,7 @@ Return Value: length = sizeof(KEY_VALUE_FULL_INFORMATION) + KeyNameStringLength + DataLength; - fullInfo = ExAllocatePoolWithTag(PagedPool, length,SERENUM_POOL_TAG); + fullInfo = ExAllocatePoolZero(PagedPool, length,SERENUM_POOL_TAG); if (ActualLength != NULL) { *ActualLength = 0; diff --git a/serial/serenum/log.c b/serial/serenum/log.c index 693bb698..ad834d4b 100644 --- a/serial/serenum/log.c +++ b/serial/serenum/log.c @@ -146,7 +146,7 @@ Return Value: KeInitializeSpinLock(&LogSpinLock); - SerenumLStart = ExAllocatePoolWithTag(NonPagedPoolNx, logSize, 'mneS'); + SerenumLStart = ExAllocatePoolZero(NonPagedPoolNx, logSize, 'mneS'); if (SerenumLStart) { SerenumLPtr = SerenumLStart; -- cgit v1.3.1