if (hMonitorList != NULL && listSize != 0)
{
- safeHMonitorList = ExAllocatePool(PagedPool, sizeof (HMONITOR) * listSize);
+ safeHMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * listSize, USERTAG_MONITORRECTS);
if (safeHMonitorList == NULL)
{
/* FIXME: SetLastWin32Error? */
safeRectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * listSize, USERTAG_MONITORRECTS);
if (safeRectList == NULL)
{
- ExFreePool(safeHMonitorList);
+ ExFreePoolWithTag(safeHMonitorList, USERTAG_MONITORRECTS);
/* FIXME: SetLastWin32Error? */
return -1;
}
ExFreePool(safeHMonitorList);
if (!NT_SUCCESS(status))
{
- ExFreePool(safeRectList);
+ ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS);
SetLastNtError(status);
return -1;
}
if (monitorRectList != NULL && listSize != 0)
{
status = MmCopyToCaller(monitorRectList, safeRectList, sizeof (RECT) * listSize);
- ExFreePool(safeRectList);
+ ExFreePoolWithTag(safeRectList, USERTAG_MONITORRECTS);
if (!NT_SUCCESS(status))
{
SetLastNtError(status);
return (HMONITOR)NULL;
}
- hMonitorList = ExAllocatePool(PagedPool, sizeof (HMONITOR) * numMonitors);
+ hMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * numMonitors, USERTAG_MONITORRECTS);
if (hMonitorList == NULL)
{
/* FIXME: SetLastWin32Error? */
rectList = ExAllocatePoolWithTag(PagedPool, sizeof (RECT) * numMonitors, USERTAG_MONITORRECTS);
if (rectList == NULL)
{
- ExFreePool(hMonitorList);
+ ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS);
/* FIXME: SetLastWin32Error? */
return (HMONITOR)NULL;
}
numMonitors, 0);
if (numMonitors <= 0)
{
- ExFreePool(hMonitorList);
- ExFreePool(rectList);
+ ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS);
+ ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS);
return (HMONITOR)NULL;
}
}
}
- ExFreePool(hMonitorList);
- ExFreePool(rectList);
+ ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS);
+ ExFreePoolWithTag(rectList, USERTAG_MONITORRECTS);
return hMonitor;
}
// DPRINT1("Status: %lx\n", Status);
if (Length)
{
- DriverNames = ExAllocatePool(PagedPool, Length);
+ DriverNames = ExAllocatePoolWithTag(PagedPool, Length, TAG_DRIVER);
// DPRINT1("Length allocated: %d\n", Length);
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
RegistryPath.Buffer,
PVOID NewBuffer;
SizeOfCachedDevModes += SizeNeeded;
- NewBuffer = ExAllocatePool(PagedPool, SizeOfCachedDevModes);
+ NewBuffer = ExAllocatePoolWithTag(PagedPool, SizeOfCachedDevModes, GDITAG_DEVMODE);
if (NewBuffer == NULL)
{
/* clean up */