Skip to content

Commit

Permalink
[general\obcallback] Replace ExAllocatePoolWithTag -> ExAllocatePool2 (
Browse files Browse the repository at this point in the history
…microsoft#736)

Replacing deprecated ExAllocatePoolWithTag to ExAllocatePool2. Builds with Windows 11 EWDK with Visual Studio Build Tools 17.1.5.
  • Loading branch information
NeoAdonis authored Jun 2, 2022
1 parent 03cb8dc commit 407a607
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions general/obcallback/driver/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ void TdSetCallContext (
{
PTD_CALL_CONTEXT CallContext;

CallContext = (PTD_CALL_CONTEXT) ExAllocatePoolWithTag (
PagedPool, sizeof(TD_CALL_CONTEXT), TD_CALL_CONTEXT_TAG
CallContext = (PTD_CALL_CONTEXT) ExAllocatePool2 (
POOL_FLAG_PAGED, sizeof(TD_CALL_CONTEXT), TD_CALL_CONTEXT_TAG
);

if (CallContext == NULL)
{
return;
}

RtlZeroMemory (CallContext, sizeof(TD_CALL_CONTEXT));

CallContext->CallbackRegistration = CallbackRegistration;
CallContext->Operation = PreInfo->Operation;
CallContext->Object = PreInfo->Object;
Expand Down

0 comments on commit 407a607

Please sign in to comment.