Skip to content

Commit

Permalink
Changed ExAllocatePool to ExAllocatePool2 with tag (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
heqianw authored Mar 25, 2022
1 parent c4db335 commit 6e59c46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bluetooth/serialhcibus/Io.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Revision History:

#define BUFFER_AND_SIZE_ADJUSTED(Buffer, Size, SegmentCount, Increment) {Buffer += Increment; Size -= Increment; SegmentCount += Increment;}

#define POOLTAG_BTHSERIALHCIBUSSAMPLE 'htbw'

#include <PSHPACK1.H>

//
Expand Down
2 changes: 1 addition & 1 deletion bluetooth/serialhcibus/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ HLP_CreatePacketEntry(
{
PHCI_PACKET_ENTRY PacketEntry = NULL;

PacketEntry = (PHCI_PACKET_ENTRY)ExAllocatePool(NonPagedPoolNx, sizeof(HCI_PACKET_ENTRY) + _PacketLength);
PacketEntry = (PHCI_PACKET_ENTRY)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(HCI_PACKET_ENTRY) + _PacketLength, POOLTAG_BTHSERIALHCIBUSSAMPLE);
if (PacketEntry != NULL) {
InitializeListHead(&PacketEntry->DataEntry);
RtlCopyMemory(PacketEntry->Packet, _Packet, _PacketLength);
Expand Down

0 comments on commit 6e59c46

Please sign in to comment.