- Fix usage of ExAllocatePoolWithQuotaTag

svn path=/trunk/; revision=60173
This commit is contained in:
Thomas Faber 2013-09-16 17:37:47 +00:00
parent 7ed8f7ad3f
commit db00a7c83c
4 changed files with 9 additions and 5 deletions

View file

@ -329,7 +329,7 @@ NpAddDataQueueEntry(IN ULONG NamedPipeEnd,
case 3: case 3:
ASSERT(Irp != NULL); ASSERT(Irp != NULL);
DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool, DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool | POOL_QUOTA_FAIL_INSTEAD_OF_RAISE,
sizeof(*DataEntry), sizeof(*DataEntry),
NPFS_DATA_ENTRY_TAG); NPFS_DATA_ENTRY_TAG);
if (!DataEntry) if (!DataEntry)
@ -371,7 +371,7 @@ NpAddDataQueueEntry(IN ULONG NamedPipeEnd,
HasSpace = FALSE; HasSpace = FALSE;
} }
DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool, DataEntry = ExAllocatePoolWithQuotaTag(NonPagedPool | POOL_QUOTA_FAIL_INSTEAD_OF_RAISE,
EntrySize, EntrySize,
NPFS_DATA_ENTRY_TAG); NPFS_DATA_ENTRY_TAG);
if (!DataEntry) if (!DataEntry)

View file

@ -433,7 +433,9 @@ NpTransceive(IN PDEVICE_OBJECT DeviceObject,
if (BytesWritten) if (BytesWritten)
{ {
NewIrp->AssociatedIrp.SystemBuffer = ExAllocatePoolWithQuotaTag(PagedPool, BytesWritten, NPFS_WRITE_BLOCK_TAG); NewIrp->AssociatedIrp.SystemBuffer = ExAllocatePoolWithQuotaTag(PagedPool | POOL_QUOTA_FAIL_INSTEAD_OF_RAISE,
BytesWritten,
NPFS_WRITE_BLOCK_TAG);
if (!NewIrp->AssociatedIrp.SystemBuffer) if (!NewIrp->AssociatedIrp.SystemBuffer)
{ {
IoFreeIrp(NewIrp); IoFreeIrp(NewIrp);

View file

@ -139,7 +139,9 @@ NpGetClientSecurityContext(IN ULONG NamedPipeEnd,
} }
else else
{ {
NewContext = ExAllocatePoolWithQuotaTag(PagedPool, sizeof(*NewContext), NPFS_CLIENT_SEC_CTX_TAG); NewContext = ExAllocatePoolWithQuotaTag(PagedPool | POOL_QUOTA_FAIL_INSTEAD_OF_RAISE,
sizeof(*NewContext),
NPFS_CLIENT_SEC_CTX_TAG);
if (!NewContext) return STATUS_INSUFFICIENT_RESOURCES; if (!NewContext) return STATUS_INSUFFICIENT_RESOURCES;
Status = SeCreateClientSecurity(Thread, &Ccb->ClientQos, 0, NewContext); Status = SeCreateClientSecurity(Thread, &Ccb->ClientQos, 0, NewContext);

View file

@ -219,7 +219,7 @@ NpAddWaiter(IN PNP_WAIT_QUEUE WaitQueue,
IoStack = IoGetCurrentIrpStackLocation(Irp); IoStack = IoGetCurrentIrpStackLocation(Irp);
WaitEntry = ExAllocatePoolWithQuotaTag(NonPagedPool, WaitEntry = ExAllocatePoolWithQuotaTag(NonPagedPool | POOL_QUOTA_FAIL_INSTEAD_OF_RAISE,
sizeof(*WaitEntry), sizeof(*WaitEntry),
NPFS_WRITE_BLOCK_TAG); NPFS_WRITE_BLOCK_TAG);
if (!WaitEntry) if (!WaitEntry)