Author: jimtabor
Date: Tue Nov 4 17:49:07 2008
New Revision: 37194
URL:
http://svn.reactos.org/svn/reactos?rev=37194&view=rev
Log:
Patch by Daniel Zimmerman : Fix a lot of missing ExFreePoolWithTag. See bug 3848.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/clip.c
trunk/reactos/subsystems/win32/win32k/misc/driver.c
trunk/reactos/subsystems/win32/win32k/ntuser/event.c
trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
trunk/reactos/subsystems/win32/win32k/ntuser/input.c
trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
trunk/reactos/subsystems/win32/win32k/ntuser/message.c
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
trunk/reactos/subsystems/win32/win32k/objects/freetype.c
trunk/reactos/subsystems/win32/win32k/objects/line.c
trunk/reactos/subsystems/win32/win32k/objects/palobj.c
trunk/reactos/subsystems/win32/win32k/objects/path.c
trunk/reactos/subsystems/win32/win32k/objects/print.c
trunk/reactos/subsystems/win32/win32k/objects/region.c
trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/clip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/clip.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -425,7 +425,6 @@
(*Spans)[i].Width = Boundary->right - Boundary->left;
}
}
-
return TRUE;
}
@@ -447,7 +446,7 @@
{
if (NULL != *Spans)
{
- ExFreePool(*Spans);
+ ExFreePoolWithTag(*Spans, TAG_CLIP);
*Spans = NULL;
}
*Count = 0;
@@ -461,7 +460,7 @@
{
*dest++ = *src++;
}
- ExFreePool(*Spans);
+ ExFreePoolWithTag(*Spans, TAG_CLIP);
}
*Spans = NewSpans;
}
Modified: trunk/reactos/subsystems/win32/win32k/misc/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/mi…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/misc/driver.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/misc/driver.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -41,12 +41,19 @@
} GRAPHICS_DRIVER, *PGRAPHICS_DRIVER;
static PGRAPHICS_DRIVER DriverList;
-static PGRAPHICS_DRIVER GenericDriver = 0;
+static PGRAPHICS_DRIVER GenericDriver = NULL;
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver)
{
- PGRAPHICS_DRIVER Driver = ExAllocatePoolWithTag(PagedPool, sizeof(*Driver),
TAG_DRIVER);
+ PGRAPHICS_DRIVER Driver;
+
DPRINT( "DRIVER_RegisterDriver( Name: %S )\n", Name );
+
+ if (GenericDriver != NULL)
+ {
+ return FALSE;
+ }
+ Driver = ExAllocatePoolWithTag(PagedPool, sizeof(*Driver), TAG_DRIVER);
if (!Driver) return FALSE;
Driver->ReferenceCount = 0;
Driver->EnableDriver = EnableDriver;
@@ -58,7 +65,7 @@
if (Driver->Name == NULL)
{
DPRINT1("Out of memory\n");
- ExFreePool(Driver);
+ ExFreePoolWithTag(Driver, TAG_DRIVER);
return FALSE;
}
@@ -66,12 +73,6 @@
Driver->Next = DriverList;
DriverList = Driver;
return TRUE;
- }
-
- if (GenericDriver != NULL)
- {
- ExFreePool(Driver);
- return FALSE;
}
GenericDriver = Driver;
@@ -156,7 +157,7 @@
ExistingDriver = DRIVER_FindExistingDDIDriver(FullName);
if (ExistingDriver)
{
- ExFreePool(FullName);
+ ExFreePoolWithTag(FullName, TAG_DRIVER);
return ExistingDriver;
}
@@ -172,7 +173,7 @@
DRIVER_RegisterDriver( L"DISPLAY", GdiDriverInfo.EntryPoint);
DRIVER_RegisterDriver( FullName, GdiDriverInfo.EntryPoint);
- ExFreePool(FullName);
+ ExFreePoolWithTag(FullName, TAG_DRIVER);
return (PGD_ENABLEDRIVER)GdiDriverInfo.EntryPoint;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -263,6 +263,11 @@
if ( !GlobalEvents )
{
GlobalEvents = ExAllocatePoolWithTag(PagedPool, sizeof(EVENTTABLE), TAG_HOOK);
+ if (GlobalEvents == NULL)
+ {
+ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ goto SetEventExit;
+ }
GlobalEvents->Counts = 0;
InitializeListHead(&GlobalEvents->Events);
}
@@ -348,7 +353,7 @@
if (! NT_SUCCESS(Status))
{
- ExFreePool(pEH->ModuleName.Buffer);
+ ExFreePoolWithTag(pEH->ModuleName.Buffer, TAG_HOOK);
UserDereferenceObject(pEH);
IntRemoveEvent(pEH);
SetLastNtError(Status);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -553,7 +553,7 @@
if (HooklParam) Debug.lParam = (LPARAM)HooklParam;
lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)&Debug);
- if (HooklParam) ExFreePool(HooklParam);
+ if (HooklParam) ExFreePoolWithTag(HooklParam, TAG_HOOK);
return lResult;
}
@@ -1131,7 +1131,7 @@
ModuleName.MaximumLength);
if (! NT_SUCCESS(Status))
{
- ExFreePool(Hook->ModuleName.Buffer);
+ ExFreePoolWithTag(Hook->ModuleName.Buffer, TAG_HOOK);
UserDereferenceObject(Hook);
IntRemoveHook(Hook, WinStaObj, FALSE);
if (NULL != Thread)
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -366,7 +366,7 @@
if (Status != STATUS_BUFFER_TOO_SMALL)
break;
- ExFreePool(Ret);
+ ExFreePoolWithTag(Ret, TAG_KEYBOARD);
Size += sizeof(KEYBOARD_INDICATOR_TRANSLATION);
@@ -380,7 +380,7 @@
if (Status != STATUS_SUCCESS)
{
- ExFreePool(Ret);
+ ExFreePoolWithTag(Ret, TAG_KEYBOARD);
return Status;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/keyboard.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -737,7 +737,7 @@
pti ? pti->KeyboardLayout->KBTables : 0 );
MmCopyToCaller(pwszBuff,OutPwszBuff,sizeof(WCHAR)*cchBuff);
- ExFreePool(OutPwszBuff);
+ ExFreePoolWithTag(OutPwszBuff, TAG_STRING);
}
else
ret = 0;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -387,7 +387,7 @@
NewMenuItem->Text.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool,
MenuItem->Text.MaximumLength, TAG_STRING);
if(!NewMenuItem->Text.Buffer)
{
- ExFreePool(NewMenuItem);
+ ExFreePoolWithTag(NewMenuItem, TAG_MENUITEM);
break;
}
RtlCopyUnicodeString(&NewMenuItem->Text, &MenuItem->Text);
@@ -938,7 +938,7 @@
if(!IntSetMenuItemInfo(SubMenu, MenuItem, ItemInfo))
{
- ExFreePool(MenuItem);
+ ExFreePoolWithTag(MenuItem, TAG_MENUITEM);
return FALSE;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -1235,7 +1235,7 @@
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed to copy message to kernel: invalid usermode
buffer\n");
- ExFreePool(KernelMem);
+ ExFreePoolWithTag(KernelMem, TAG_MSG);
return Status;
}
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -341,7 +341,7 @@
Status = MmCopyFromCaller(Dest->Buffer, Src, Dest->Length);
if(!NT_SUCCESS(Status))
{
- ExFreePool(Dest->Buffer);
+ ExFreePoolWithTag(Dest->Buffer, TAG_STRING);
Dest->Buffer = NULL;
return Status;
}
@@ -388,7 +388,7 @@
Status = MmCopyFromCaller(Dest->Buffer, Src, Dest->Length);
if(!NT_SUCCESS(Status))
{
- ExFreePool(Dest->Buffer);
+ ExFreePoolWithTag(Dest->Buffer, TAG_STRING);
Dest->Buffer = NULL;
return Status;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/sysparams.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -383,7 +383,7 @@
if(!NT_SUCCESS(Status) || (KeyValuePartialInfo->Type != REG_SZ))
{
ZwClose(KeyHandle);
- ExFreePool(KeyValuePartialInfo);
+ ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING);
return FALSE;
}
@@ -396,7 +396,7 @@
{
TileNum = 0;
}
- ExFreePool(KeyValuePartialInfo);
+ ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING);
/* start over again and look for the style*/
ResLength = 0;
@@ -418,7 +418,7 @@
if(!NT_SUCCESS(Status) || (KeyValuePartialInfo->Type != REG_SZ))
{
ZwClose(KeyHandle);
- ExFreePool(KeyValuePartialInfo);
+ ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING);
return FALSE;
}
@@ -431,7 +431,7 @@
{
StyleNum = 0;
}
- ExFreePool(KeyValuePartialInfo);
+ ExFreePoolWithTag(KeyValuePartialInfo, TAG_STRING);
/* Check the values we found in the registry */
if(TileNum && !StyleNum)
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -704,7 +704,7 @@
}
IntGetBitmapBits (Bitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf);
IntSetBitmapBits (resBitmap, bm.bmWidthBytes * abs(bm.bmHeight), buf);
- ExFreePool (buf);
+ ExFreePoolWithTag (buf,TAG_BITMAP);
resBitmap->flFlags = Bitmap->flFlags;
GDIOBJ_UnlockObjByPtr((POBJ)resBitmap);
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -860,7 +860,6 @@
* if it negitve we getting to many scanline for scanline is UINT not
* a INT, so we need make the negtive value to positve and that make the
* count correct for negtive bitmap, TODO : we need testcase for this api */
-
IntSetDIBits(pDC, hBitmap, 0, abs(BitsInfo->bmiHeader.biHeight), Bits,
BitsInfo, Usage);
@@ -1187,7 +1186,7 @@
{
if (lpRGB != bmi->bmiColors)
{
- ExFreePool(lpRGB);
+ ExFreePoolWithTag(lpRGB, TAG_COLORMAP);
}
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
return NULL;
@@ -1197,7 +1196,7 @@
{
if (lpRGB != bmi->bmiColors)
{
- ExFreePool(lpRGB);
+ ExFreePoolWithTag(lpRGB, TAG_COLORMAP);
}
SetLastWin32Error(ERROR_INVALID_HANDLE);
NtGdiDeleteObject(bmp);
@@ -1238,14 +1237,14 @@
VirtualFree(bm.bmBits, 0L, MEM_RELEASE), bm.bmBits = NULL;
} */
- if (dib) { ExFreePool(dib); dib = NULL; }
+ if (dib) { ExFreePoolWithTag(dib, TAG_DIB); dib = NULL; }
if (bmp) { bmp = NULL; }
if (res) { BITMAPOBJ_FreeBitmapByHandle(res); res = 0; }
}
if (lpRGB != bmi->bmiColors)
{
- ExFreePool(lpRGB);
+ ExFreePoolWithTag(lpRGB, TAG_COLORMAP);
}
if (bmp)
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -425,7 +425,7 @@
if (!NT_SUCCESS(Status))
{
- ExFreePool(pTemp);
+ ExFreePoolWithTag(pTemp, TAG_SHAPE);
return FALSE;
}
@@ -434,7 +434,7 @@
{
HRGN hRgn;
hRgn = IntCreatePolyPolygonRgn(SafePoints, SafeCounts, Count, (INT_PTR)hDC);
- ExFreePool(pTemp);
+ ExFreePoolWithTag(pTemp, TAG_SHAPE);
return (ULONG_PTR)hRgn;
}
@@ -1001,7 +1001,7 @@
if (!NT_SUCCESS(Status))
{
DC_UnlockDc(dc);
- ExFreePool(SafeVertex);
+ ExFreePoolWithTag(SafeVertex, TAG_SHAPE);
SetLastNtError(Status);
return FALSE;
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -371,7 +371,7 @@
{
FT_Done_Face(Face);
ObDereferenceObject(SectionObject);
- ExFreePool(Entry);
+ ExFreePoolWithTag(Entry, TAG_FONT);
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
@@ -382,7 +382,7 @@
EngFreeMem(FontGDI);
FT_Done_Face(Face);
ObDereferenceObject(SectionObject);
- ExFreePool(Entry);
+ ExFreePoolWithTag(Entry, TAG_FONT);
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
@@ -1011,7 +1011,7 @@
if (0 == (TM->tmPitchAndFamily & TMPF_VECTOR))
Info->FontType |= RASTER_FONTTYPE;
- ExFreePool(Otm);
+ ExFreePoolWithTag(Otm, TAG_GDITEXT);
wcsncpy(Info->EnumLogFontEx.elfLogFont.lfFaceName, FaceName, LF_FACESIZE);
wcsncpy(Info->EnumLogFontEx.elfFullName, FaceName, LF_FULLFACESIZE);
Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -198,7 +198,7 @@
if ( Pts )
{
ret = IntGdiPolyline(dc, Pts, nOut);
- ExFreePool(Pts);
+ ExFreePoolWithTag(Pts, TAG_BEZIER);
}
}
@@ -228,7 +228,7 @@
npt[0].y = Dc_Attr->ptlCurrent.y;
memcpy(npt + 1, pt, sizeof(POINT) * Count);
ret = IntGdiPolyBezier(dc, npt, Count+1);
- ExFreePool(npt);
+ ExFreePoolWithTag(npt, TAG_BEZIER);
}
}
if ( ret )
@@ -331,7 +331,7 @@
pts[0].y = Dc_Attr->ptlCurrent.y;
memcpy( pts + 1, pt, sizeof(POINT) * Count);
ret = IntGdiPolyline(dc, pts, Count + 1);
- ExFreePool(pts);
+ ExFreePoolWithTag(pts, TAG_SHAPE);
}
}
if ( ret )
Modified: trunk/reactos/subsystems/win32/win32k/objects/palobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/palobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/palobj.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -170,7 +170,7 @@
}
hpalette = NtGdiCreatePaletteInternal(palPtr,NB_RESERVED_COLORS);
- ExFreePool(palPtr);
+ ExFreePoolWithTag(palPtr, TAG_PALETTE);
#ifndef NO_MAPPING
palObj = (PALOBJ*)PALETTE_LockPalette(hpalette);
Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -181,8 +181,8 @@
{
ASSERT(pPath!=NULL);
- if (pPath->pPoints) ExFreePool(pPath->pPoints);
- if (pPath->pFlags) ExFreePool(pPath->pFlags);
+ if (pPath->pPoints) ExFreePoolWithTag(pPath->pPoints, TAG_PATH);
+ if (pPath->pFlags) ExFreePoolWithTag(pPath->pFlags, TAG_PATH);
}
/* PATH_AssignGdiPath
@@ -991,7 +991,7 @@
for(i = 1; i < no; i++)
PATH_AddEntry(pPath, &pts[i], (i == no-1 && closed) ? PT_LINETO |
PT_CLOSEFIGURE : PT_LINETO);
- ExFreePool(pts);
+ ExFreePoolWithTag(pts, TAG_BEZIER);
return TRUE;
}
@@ -1092,7 +1092,7 @@
}
/* Free memory for number-of-points-in-stroke array */
- ExFreePool(pNumPointsInStroke);
+ ExFreePoolWithTag(pNumPointsInStroke, TAG_PATH);
/* Success! */
*pHrgn=hrgn;
@@ -1189,7 +1189,7 @@
pFlagsNew=(BYTE *)ExAllocatePoolWithTag(PagedPool, numEntriesToAllocate *
sizeof(BYTE), TAG_PATH);
if(!pFlagsNew)
{
- ExFreePool(pPointsNew);
+ ExFreePoolWithTag(pPointsNew, TAG_PATH);
return FALSE;
}
@@ -1201,8 +1201,8 @@
memcpy(pPointsNew, pPath->pPoints, sizeof(POINT)*pPath->numEntriesUsed);
memcpy(pFlagsNew, pPath->pFlags, sizeof(BYTE)*pPath->numEntriesUsed);
- ExFreePool(pPath->pPoints);
- ExFreePool(pPath->pFlags);
+ ExFreePoolWithTag(pPath->pPoints, TAG_PATH);
+ ExFreePoolWithTag(pPath->pFlags, TAG_PATH);
}
pPath->pPoints=pPointsNew;
pPath->pFlags=pFlagsNew;
@@ -1424,12 +1424,12 @@
}
memcpy(Realloc, pLinePts, nLinePts*sizeof(POINT));
- ExFreePool(pLinePts);
+ ExFreePoolWithTag(pLinePts, TAG_PATH);
pLinePts = Realloc;
}
memcpy(&pLinePts[nLinePts], &pBzrPts[1], (nBzrPts - 1) *
sizeof(POINT));
nLinePts += nBzrPts - 1;
- ExFreePool(pBzrPts);
+ ExFreePoolWithTag(pBzrPts, TAG_BEZIER);
i += 2;
}
break;
@@ -1449,7 +1449,7 @@
ret = TRUE;
end:
- if(pLinePts)ExFreePool(pLinePts);
+ if(pLinePts) ExFreePoolWithTag(pLinePts, TAG_PATH);
/* Restore the old mapping mode */
Dc_Attr->iMapMode = mapMode;
@@ -1534,13 +1534,13 @@
else
{
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
- ExFreePool(elp);
+ ExFreePoolWithTag(elp, TAG_PATH);
PATH_UnlockPath( pPath );
return FALSE;
}
penWidth = elp->elpWidth;
- ExFreePool(elp);
+ ExFreePoolWithTag(elp, TAG_PATH);
endcap = (PS_ENDCAP_MASK & penStyle);
joint = (PS_JOIN_MASK & penStyle);
@@ -1588,7 +1588,7 @@
}
numStrokes++;
j = 0;
- ExFreePool(pStrokes);
+ ExFreePoolWithTag(pStrokes, TAG_PATH);
pStrokes = ExAllocatePoolWithTag(PagedPool, numStrokes * sizeof(PPATH),
TAG_PATH);
pStrokes[numStrokes - 1] = ExAllocatePoolWithTag(PagedPool, sizeof(PATH),
TAG_PATH);
@@ -1834,19 +1834,19 @@
}
PATH_DestroyGdiPath(pStrokes[i]);
- ExFreePool(pStrokes[i]);
+ ExFreePoolWithTag(pStrokes[i], TAG_PATH);
PATH_DestroyGdiPath(pUpPath);
- ExFreePool(pUpPath);
+ ExFreePoolWithTag(pUpPath, TAG_PATH);
PATH_DestroyGdiPath(pDownPath);
- ExFreePool(pDownPath);
- }
- ExFreePool(pStrokes);
+ ExFreePoolWithTag(pDownPath, TAG_PATH);
+ }
+ ExFreePoolWithTag(pStrokes, TAG_PATH);
pNewPath->state = PATH_Closed;
if (!(ret = PATH_AssignGdiPath(pPath, pNewPath)))
DPRINT1("Assign path failed\n");
PATH_DestroyGdiPath(pNewPath);
- ExFreePool(pNewPath);
+ ExFreePoolWithTag(pNewPath, TAG_PATH);
return ret;
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/print.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/print.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/print.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -223,7 +223,7 @@
if ( !NT_SUCCESS(Status) )
{
- ExFreePool ( SafeInData );
+ ExFreePoolWithTag ( SafeInData, TAG_PRINT );
DC_UnlockDc(pDC);
SetLastNtError(Status);
return -1;
@@ -256,7 +256,7 @@
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
freeout:
if ( SafeInData )
- ExFreePool ( SafeInData );
+ ExFreePoolWithTag ( SafeInData, TAG_PRINT );
DC_UnlockDc(pDC);
return -1;
}
@@ -267,7 +267,7 @@
DC_UnlockDc(pDC);
if ( SafeInData )
- ExFreePool ( SafeInData );
+ ExFreePoolWithTag ( SafeInData ,TAG_PRINT );
if ( SafeOutData )
{
@@ -284,7 +284,7 @@
}
_SEH_END;
- ExFreePool ( SafeOutData );
+ ExFreePoolWithTag ( SafeOutData, TAG_PRINT );
if ( !NT_SUCCESS(Status) )
{
SetLastNtError(Status);
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Tue Nov 4
17:49:07 2008
@@ -420,7 +420,7 @@
}
temp = ExAllocatePoolWithTag(PagedPool, NewSize, TAG_REGION);
- if (temp == 0)
+ if (temp == NULL)
{
return 0;
}
@@ -431,7 +431,7 @@
reg->rdh.nRgnSize = NewSize;
if (*firstrect != ®->rdh.rcBound)
{
- ExFreePool(*firstrect);
+ ExFreePoolWithTag(*firstrect, TAG_REGION);
}
*firstrect = temp;
*rect = (*firstrect)+reg->rdh.nCount;
@@ -520,7 +520,7 @@
return FALSE;
if (dst->Buffer && dst->Buffer != &dst->rdh.rcBound)
- ExFreePool(dst->Buffer); //free the old buffer
+ ExFreePoolWithTag(dst->Buffer, TAG_REGION); //free the old buffer
dst->Buffer = temp;
dst->rdh.nRgnSize = src->rdh.nCount * sizeof(RECT); //size of region
buffer
}
@@ -608,7 +608,7 @@
{
xrect = ExAllocatePoolWithTag(PagedPool, rgnSrc->rdh.nCount *
sizeof(RECT), TAG_REGION);
if (rgnDst->Buffer && rgnDst->Buffer !=
&rgnDst->rdh.rcBound)
- ExFreePool(rgnDst->Buffer); //free the old buffer. will be assigned to
xrect below.
+ ExFreePoolWithTag(rgnDst->Buffer, TAG_REGION); //free the old buffer.
will be assigned to xrect below.
}
if (xrect)
@@ -676,7 +676,7 @@
return FALSE;
if (rgnDst->Buffer && rgnDst->Buffer !=
&rgnDst->rdh.rcBound)
- ExFreePool(rgnDst->Buffer); //free the old buffer
+ ExFreePoolWithTag(rgnDst->Buffer, TAG_REGION); //free the old buffer
rgnDst->Buffer = temp;
rgnDst->rdh.nCount = i;
rgnDst->rdh.nRgnSize = i * sizeof(RECT);
@@ -1169,7 +1169,7 @@
newReg->rdh.nRgnSize = newReg->rdh.nCount*sizeof(RECT);
COPY_RECTS(newReg->Buffer, prev_rects, newReg->rdh.nCount);
if (prev_rects != &newReg->rdh.rcBound)
- ExFreePool(prev_rects);
+ ExFreePoolWithTag(prev_rects, TAG_REGION);
}
}
else
@@ -1180,7 +1180,7 @@
*/
newReg->rdh.nRgnSize = sizeof(RECT);
if (newReg->Buffer != &newReg->rdh.rcBound)
- ExFreePool(newReg->Buffer);
+ ExFreePoolWithTag(newReg->Buffer, TAG_REGION);
newReg->Buffer = ExAllocatePoolWithTag(PagedPool, sizeof(RECT),
TAG_REGION);
ASSERT(newReg->Buffer);
}
@@ -1188,7 +1188,7 @@
newReg->rdh.iType = RDH_RECTANGLES;
if (oldRects != &newReg->rdh.rcBound)
- ExFreePool(oldRects);
+ ExFreePoolWithTag(oldRects, TAG_REGION);
return;
}
@@ -3475,7 +3475,7 @@
{
COPY_RECTS(temp, reg->Buffer, reg->rdh.nCount);
if (reg->Buffer != ®->rdh.rcBound)
- ExFreePool(reg->Buffer);
+ ExFreePoolWithTag(reg->Buffer, TAG_REGION);
}
reg->Buffer = temp;
@@ -3754,7 +3754,7 @@
if (!tmpPtBlock)
{
DPRINT1("Can't alloc tPB\n");
- ExFreePool(pETEs);
+ ExFreePoolWithTag(pETEs, TAG_REGION);
return 0;
}
curPtBlock->next = tmpPtBlock;
@@ -3813,7 +3813,7 @@
if (!tmpPtBlock)
{
DPRINT1("Can't alloc tPB\n");
- ExFreePool(pETEs);
+ ExFreePoolWithTag(pETEs, TAG_REGION);
NtGdiDeleteObject(hrgn);
return 0;
}
@@ -3845,10 +3845,10 @@
for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;)
{
tmpPtBlock = curPtBlock->next;
- ExFreePool(curPtBlock);
+ ExFreePoolWithTag(curPtBlock, TAG_REGION);
curPtBlock = tmpPtBlock;
}
- ExFreePool(pETEs);
+ ExFreePoolWithTag(pETEs, TAG_REGION);
REGION_UnlockRgn(region);
return hrgn;
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Tue Nov 4 17:49:07
2008
@@ -178,7 +178,7 @@
Dx = ExAllocatePoolWithTag(PagedPool, Count * sizeof(INT), TAG_GDITEXT);
if (NULL == Dx)
{
- ExFreePool(String);
+ ExFreePoolWithTag(String, TAG_GDITEXT);
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
@@ -193,9 +193,9 @@
{
if (NULL != Dx)
{
- ExFreePool(Dx);
- }
- ExFreePool(String);
+ ExFreePoolWithTag(Dx, TAG_GDITEXT);
+ }
+ ExFreePoolWithTag(String, TAG_GDITEXT);
SetLastNtError(Status);
return FALSE;
}
@@ -205,9 +205,9 @@
{
if (NULL != Dx)
{
- ExFreePool(Dx);
- }
- ExFreePool(String);
+ ExFreePoolWithTag(Dx, TAG_GDITEXT);
+ }
+ ExFreePoolWithTag(String, TAG_GDITEXT);
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
@@ -224,12 +224,12 @@
Result = FALSE;
DC_UnlockDc(dc);
- ExFreePool(String);
+ ExFreePoolWithTag(String, TAG_GDITEXT);
if (! Result)
{
if (NULL != Dx)
{
- ExFreePool(Dx);
+ ExFreePoolWithTag(Dx, TAG_GDITEXT);
}
return FALSE;
}
@@ -241,7 +241,7 @@
{
if (NULL != Dx)
{
- ExFreePool(Dx);
+ ExFreePoolWithTag(Dx, TAG_GDITEXT);
}
SetLastNtError(Status);
return FALSE;
@@ -255,7 +255,7 @@
{
if (NULL != Dx)
{
- ExFreePool(Dx);
+ ExFreePoolWithTag(Dx, TAG_GDITEXT);
}
SetLastNtError(Status);
return FALSE;
@@ -263,7 +263,7 @@
}
if (NULL != Dx)
{
- ExFreePool(Dx);
+ ExFreePoolWithTag(Dx,TAG_GDITEXT);
}
Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));