mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[NTOSKRNL] Taggify some allocs
This commit is contained in:
parent
a5daa8894d
commit
651ba03c6d
2 changed files with 12 additions and 6 deletions
|
@ -178,6 +178,8 @@
|
|||
#define TAG_LUID 'uLeS'
|
||||
#define TAG_PRIVILEGE_SET 'rPeS'
|
||||
#define TAG_TOKEN_DYNAMIC 'dTeS'
|
||||
#define TAG_SE_HANDLES_TAB 'aHeS'
|
||||
#define TAG_SE_DIR_BUFFER 'bDeS'
|
||||
|
||||
/* LPC Tags */
|
||||
#define TAG_LPC_MESSAGE 'McpL'
|
||||
|
|
|
@ -489,7 +489,9 @@ SepCleanupLUIDDeviceMapDirectory(
|
|||
* All handles have been already closed
|
||||
*/
|
||||
AllocateLinksAgain:
|
||||
LinksBuffer = ExAllocatePoolWithTag(PagedPool, LinksSize, 'aHeS');
|
||||
LinksBuffer = ExAllocatePoolWithTag(PagedPool,
|
||||
LinksSize,
|
||||
TAG_SE_HANDLES_TAB);
|
||||
if (LinksBuffer == NULL)
|
||||
{
|
||||
/*
|
||||
|
@ -504,7 +506,7 @@ AllocateLinksAgain:
|
|||
*/
|
||||
if (DirectoryInfo != NULL)
|
||||
{
|
||||
ExFreePoolWithTag(DirectoryInfo, 0);
|
||||
ExFreePoolWithTag(DirectoryInfo, TAG_SE_DIR_BUFFER);
|
||||
}
|
||||
|
||||
if (!UseCurrentProc)
|
||||
|
@ -551,7 +553,9 @@ AllocateLinksAgain:
|
|||
}
|
||||
|
||||
/* And reallocate a bigger one */
|
||||
DirectoryInfo = ExAllocatePoolWithTag(PagedPool, DirInfoLength, 'bDeS');
|
||||
DirectoryInfo = ExAllocatePoolWithTag(PagedPool,
|
||||
DirInfoLength,
|
||||
TAG_SE_DIR_BUFFER);
|
||||
/* Fail if we cannot allocate */
|
||||
if (DirectoryInfo == NULL)
|
||||
{
|
||||
|
@ -584,7 +588,7 @@ AllocateLinksAgain:
|
|||
/* Allow 20 more HANDLEs */
|
||||
LinksCount += 20;
|
||||
CurrentLinks = 0;
|
||||
ExFreePoolWithTag(LinksBuffer, 'aHeS');
|
||||
ExFreePoolWithTag(LinksBuffer, TAG_SE_HANDLES_TAB);
|
||||
LinksSize = LinksCount * sizeof(HANDLE);
|
||||
|
||||
/* And reloop again */
|
||||
|
@ -627,12 +631,12 @@ AllocateLinksAgain:
|
|||
ZwClose(LinksBuffer[i]);
|
||||
}
|
||||
/* And free our links buffer */
|
||||
ExFreePoolWithTag(LinksBuffer, 'aHeS');
|
||||
ExFreePoolWithTag(LinksBuffer, TAG_SE_HANDLES_TAB);
|
||||
|
||||
/* Free our directory info buffer - it might be NULL if we failed realloc */
|
||||
if (DirectoryInfo != NULL)
|
||||
{
|
||||
ExFreePoolWithTag(DirectoryInfo, 'bDeS');
|
||||
ExFreePoolWithTag(DirectoryInfo, TAG_SE_DIR_BUFFER);
|
||||
}
|
||||
|
||||
/* Close our session directory */
|
||||
|
|
Loading…
Reference in a new issue