- Use more pool tagging

svn path=/trunk/; revision=59542
This commit is contained in:
Thomas Faber 2013-07-20 17:46:38 +00:00
parent a90ffcf21e
commit 8929ef31df
12 changed files with 20 additions and 19 deletions

View file

@ -180,7 +180,7 @@ CmUnRegisterCallback(IN LARGE_INTEGER Cookie)
ExReleaseFastMutex(&CmiCallbackLock);
/* free the callback */
ExFreePool(CurrentCallback);
ExFreePoolWithTag(CurrentCallback, 'bcMC');
return STATUS_SUCCESS;
}
else

View file

@ -359,7 +359,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
if (!NT_SUCCESS(Status))
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM);
ObDereferenceObject(Event);
ZwClose(EventHandle);
DPRINT1("ZwCreateFile failed : %lx.\n", Status);
@ -397,7 +397,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
if (!NT_SUCCESS(Status))
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM);
ObDereferenceObject(Event);
ZwClose(EventHandle);
ZwClose(*Primary);
@ -461,7 +461,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
if (!NT_SUCCESS(Status))
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM);
ObDereferenceObject(Event);
ZwClose(EventHandle);
return Status;
@ -471,7 +471,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
if (FsSizeInformation.BytesPerSector > HBLOCK_SIZE)
{
/* Close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM);
ObDereferenceObject(Event);
ZwClose(EventHandle);
return STATUS_CANNOT_LOAD_REGISTRY_FILE;
@ -596,7 +596,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
}
/* We're done, close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM);
ObDereferenceObject(Event);
ZwClose(EventHandle);
return STATUS_SUCCESS;

View file

@ -164,7 +164,7 @@ CmpQueryKeyName(IN PVOID ObjectBody,
((Length < (*ReturnLength)) && (BytesToCopy < sizeof(WCHAR))))
{
/* Free the buffer allocated by CmpConstructName */
ExFreePool(KeyName);
ExFreePoolWithTag(KeyName, TAG_CM);
/* Return buffer length failure without writing anything there because nothing fits */
return STATUS_INFO_LENGTH_MISMATCH;
@ -207,7 +207,7 @@ CmpQueryKeyName(IN PVOID ObjectBody,
_SEH2_END;
/* Free the buffer allocated by CmpConstructName */
ExFreePool(KeyName);
ExFreePoolWithTag(KeyName, TAG_CM);
/* Return status */
return Status;

View file

@ -546,7 +546,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
}
/* Free the configuration data */
ExFreePool(CmpConfigurationData);
ExFreePoolWithTag(CmpConfigurationData, TAG_CM);
}
/* Open physical memory */
@ -824,7 +824,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc
ZwClose(SectionHandle);
/* Free the BIOS version string buffer */
if (BiosVersion) ExFreePool(BiosVersion);
if (BiosVersion) ExFreePoolWithTag(BiosVersion, TAG_CM);
Quickie:
/* Close the procesor handle */

View file

@ -787,7 +787,7 @@ QSI_DEF(SystemProcessInformation)
RtlCopyMemory(SpiCurrent->ImageName.Buffer, szSrc, SpiCurrent->ImageName.Length);
/* Release the memory allocated by SeLocateProcessImageName */
ExFreePool(ProcessImageName);
ExFreePoolWithTag(ProcessImageName, TAG_SEPA);
}
else
{

View file

@ -424,7 +424,7 @@ FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync,
}
/* Finally, free the notification, as it's not needed anymore */
ExFreePool(NotifyChange);
ExFreePoolWithTag(NotifyChange, 'FSrN');
}
}
}

View file

@ -1581,7 +1581,7 @@ MiReleaseProcessReferenceToSessionDataPage(IN PMM_SESSION_SPACE SessionGlobal)
/* Free the session page tables */
#ifndef _M_AMD64
ExFreePool(SessionGlobal->PageTables);
ExFreePoolWithTag(SessionGlobal->PageTables, 'tHmM');
#endif
ASSERT(!MI_IS_PHYSICAL_ADDRESS(SessionGlobal));

View file

@ -332,7 +332,7 @@ MiInsertInSystemSpace(IN PMMSESSION Session,
PagedPool,
HashSize *
sizeof(MMVIEW),
' mM');
TAG_MM);
if (!Session->SystemSpaceViewTable)
{
/* Failed to allocate a new table, keep the old one for now */

View file

@ -553,7 +553,7 @@ MmDereferencePage(PFN_NUMBER Pfn)
/* It's not a ROS PFN anymore */
Page->u4.AweAllocation = FALSE;
ExFreePool(MI_GET_ROS_DATA(Page));
ExFreePoolWithTag(MI_GET_ROS_DATA(Page), 'RsPf');
Page->RosMmData = 0;
/* Bring it back into the free list */

View file

@ -276,7 +276,8 @@ PspDeleteProcess(IN PVOID ObjectBody)
if (Process->SeAuditProcessCreationInfo.ImageFileName)
{
/* Free it */
ExFreePool(Process->SeAuditProcessCreationInfo.ImageFileName);
ExFreePoolWithTag(Process->SeAuditProcessCreationInfo.ImageFileName,
TAG_SEPA);
Process->SeAuditProcessCreationInfo.ImageFileName = NULL;
}
@ -679,7 +680,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
NextPort = TerminationPort->Next;
/* Free the Termination Port Object */
ExFreePool(TerminationPort);
ExFreePoolWithTag(TerminationPort, '=TsP');
/* Keep looping as long as there is a port */
TerminationPort = NextPort;

View file

@ -655,7 +655,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
Process->SeAuditProcessCreationInfo.ImageFileName =
ExAllocatePoolWithTag(PagedPool,
sizeof(OBJECT_NAME_INFORMATION),
'aPeS');
TAG_SEPA);
if (!Process->SeAuditProcessCreationInfo.ImageFileName)
{
/* Fail */

View file

@ -699,7 +699,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
}
/* Free the image path */
ExFreePool(ImageName);
ExFreePoolWithTag(ImageName, TAG_SEPA);
}
/* Dereference the process */
ObDereferenceObject(Process);