Driver: fortutl: Use fort_mem_alloc() with tag

Remove fort_mem_alloc_notag().
This commit is contained in:
Nodir Temirkhodjaev 2022-06-24 18:28:02 +05:00
parent 48fe7cded9
commit a9c70ab466
2 changed files with 5 additions and 4 deletions

View File

@ -25,10 +25,9 @@
# define fort_mem_exec_alloc(size, tag) \
ExAllocatePool2(POOL_FLAG_UNINITIALIZED | POOL_FLAG_NON_PAGED_EXECUTE, (size), (tag))
#endif
#define fort_mem_free(p, tag) ExFreePoolWithTag((p), (tag))
#define fort_mem_alloc_notag(size) ExAllocatePool(NonPagedPoolNx, (size))
#define fort_mem_free_notag(p) ExFreePool((p))
#define fort_mem_free(p, tag) ExFreePoolWithTag((p), (tag))
#define fort_mem_free_notag(p) ExFreePool((p))
#define fort_request_complete_info(irp, status, info) \
do { \

View File

@ -2,6 +2,8 @@
#include "fortutl.h"
#define FORT_UTL_POOL_TAG 'UwfF'
#define FORT_MAX_FILE_SIZE (4 * 1024 * 1024)
#define FORT_KEY_INFO_PATH_SIZE \
@ -15,7 +17,7 @@ static UNICODE_STRING g_systemDrivePath;
static NTSTATUS fort_string_new(ULONG len, PCWSTR src, PUNICODE_STRING outData)
{
PWSTR buf = fort_mem_alloc_notag(len);
PWSTR buf = fort_mem_alloc(len, FORT_UTL_POOL_TAG);
if (buf == NULL)
return STATUS_INSUFFICIENT_RESOURCES;