Author: tfaber
Date: Mon May 8 06:54:35 2017
New Revision: 74496
URL:
http://svn.reactos.org/svn/reactos?rev=74496&view=rev
Log:
[NTOS:IO]
- Use pool tagging
Modified:
trunk/reactos/ntoskrnl/io/iomgr/driver.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Mon May 8 06:54:35 2017
@@ -898,7 +898,9 @@
IopDisplayLoadingMessage(ModuleName);
InbvIndicateProgress();
- Buffer = ExAllocatePool(PagedPool, ModuleName->Length + sizeof(UNICODE_NULL));
+ Buffer = ExAllocatePoolWithTag(PagedPool,
+ ModuleName->Length + sizeof(UNICODE_NULL),
+ TAG_IO);
if (Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
@@ -924,7 +926,7 @@
* Strip the file extension from ServiceName
*/
Success = RtlCreateUnicodeString(&ServiceName, FileNameWithoutPath);
- ExFreePool(Buffer);
+ ExFreePoolWithTag(Buffer, TAG_IO);
if (!Success)
{
return STATUS_INSUFFICIENT_RESOURCES;
@@ -1284,7 +1286,9 @@
*/
ObjectName.Length = ((USHORT)wcslen(Start) + 8) * sizeof(WCHAR);
ObjectName.MaximumLength = ObjectName.Length + sizeof(WCHAR);
- ObjectName.Buffer = ExAllocatePool(PagedPool, ObjectName.MaximumLength);
+ ObjectName.Buffer = ExAllocatePoolWithTag(PagedPool,
+ ObjectName.MaximumLength,
+ TAG_IO);
if (!ObjectName.Buffer) return STATUS_INSUFFICIENT_RESOURCES;
wcscpy(ObjectName.Buffer, DRIVER_ROOT_NAME);
memcpy(ObjectName.Buffer + 8, Start, ObjectName.Length - 8 * sizeof(WCHAR));
@@ -1305,12 +1309,12 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Can't locate driver object for %wZ\n", &ObjectName);
- ExFreePool(ObjectName.Buffer);
+ ExFreePoolWithTag(ObjectName.Buffer, TAG_IO);
return Status;
}
/* Free the buffer for driver object name */
- ExFreePool(ObjectName.Buffer);
+ ExFreePoolWithTag(ObjectName.Buffer, TAG_IO);
/* Check that driver is not already unloading */
if (DriverObject->Flags & DRVO_UNLOAD_INVOKED)