https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1ea68d0510aafddec1334d3465fa47f03f391ca5
commit 1ea68d0510aafddec1334d3465fa47f03f391ca5 Author: Pierre Schweitzer <pie...@reactos.org> AuthorDate: Mon Aug 13 08:29:17 2018 +0200 Commit: Pierre Schweitzer <pie...@reactos.org> CommitDate: Mon Aug 13 08:30:17 2018 +0200 [NTOSKRNL] Don't use anonymus allocations for MM objects --- ntoskrnl/mm/pagefile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ntoskrnl/mm/pagefile.c b/ntoskrnl/mm/pagefile.c index 29cfdbc820..bbf3d94d3c 100644 --- a/ntoskrnl/mm/pagefile.c +++ b/ntoskrnl/mm/pagefile.c @@ -651,13 +651,13 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, return STATUS_FLOPPY_VOLUME; } - PagingFile = ExAllocatePool(NonPagedPool, sizeof(*PagingFile)); + PagingFile = ExAllocatePoolWithTag(NonPagedPool, sizeof(*PagingFile), TAG_MM); if (PagingFile == NULL) { ObDereferenceObject(FileObject); ZwClose(FileHandle); ExFreePoolWithTag(Buffer, TAG_MM); - return STATUS_NO_MEMORY; + return STATUS_INSUFFICIENT_RESOURCES; } RtlZeroMemory(PagingFile, sizeof(*PagingFile)); @@ -677,11 +677,11 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, TAG_MM); if (PagingFile->AllocMap == NULL) { - ExFreePool(PagingFile); + ExFreePoolWithTag(PagingFile, TAG_MM); ObDereferenceObject(FileObject); ZwClose(FileHandle); ExFreePoolWithTag(Buffer, TAG_MM); - return STATUS_NO_MEMORY; + return STATUS_INSUFFICIENT_RESOURCES; } RtlInitializeBitMap(PagingFile->AllocMap, @@ -698,7 +698,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, MmSwapSpaceMessage = FALSE; - return(STATUS_SUCCESS); + return STATUS_SUCCESS; } /* EOF */