mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[NTOSKRNL] Don't use anonymus allocations for MM objects
This commit is contained in:
parent
34e8f45122
commit
1ea68d0510
1 changed files with 5 additions and 5 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue