mirror of
https://github.com/reactos/reactos.git
synced 2024-10-20 16:06:27 +00:00
- fix mem leak when failing to create an extpen with penstyles
- rename a tag, change a tag, remove unused tag svn path=/trunk/; revision=33856
This commit is contained in:
parent
63428932b8
commit
a1aca981cf
|
@ -62,7 +62,6 @@
|
|||
#define TAG_COORD TAG('C', 'O', 'R', 'D') /* coords */
|
||||
#define TAG_GDIDEV TAG('G', 'd', 'e', 'v') /* gdi dev support*/
|
||||
#define TAG_GDIPDEV TAG('G', 'D', 'e', 'v') /* gdi PDev */
|
||||
#define TAG_GDIOBJ TAG('G', 'D', 'I', 'O') /* gdi obj */
|
||||
#define TAG_GDIHNDTBLE TAG('G', 'D', 'I', 'H') /* gdi handle table */
|
||||
#define TAG_GDIICM TAG('G', 'i', 'c', 'm') /* gdi Icm */
|
||||
#define TAG_DIB TAG('D', 'I', 'B', ' ') /* dib */
|
||||
|
@ -71,13 +70,13 @@
|
|||
#define TAG_PALETTEMAP TAG('P', 'A', 'L', 'M') /* palette mapping */
|
||||
#define TAG_PRINT TAG('P', 'R', 'N', 'T') /* print */
|
||||
#define TAG_GDITEXT TAG('T', 'X', 'T', 'O') /* text */
|
||||
#define TAG_EXTPEN TAG('X', 'P', 'E', 'N') /* extpen */
|
||||
#define TAG_PENSTYLES TAG('G', 's', 't', 'y') /* pen styles */
|
||||
|
||||
/* Eng objects */
|
||||
#define TAG_CLIPOBJ TAG('C', 'L', 'P', 'O') /* clip object */
|
||||
#define TAG_DRIVEROBJ TAG('D', 'R', 'V', 'O') /* driver object */
|
||||
#define TAG_FONT TAG('F', 'N', 'T', 'E') /* font entry */
|
||||
#define TAG_FONTOBJ TAG('F', 'N', 'T', 'O') /* font object */
|
||||
#define TAG_FONTOBJ TAG('G', 'f', 'n', 't') /* font object */
|
||||
#define TAG_WNDOBJ TAG('W', 'N', 'D', 'O') /* window object */
|
||||
#define TAG_XLATEOBJ TAG('X', 'L', 'A', 'O') /* xlate object */
|
||||
#define TAG_BITMAPOBJ TAG('B', 'M', 'P', 'O') /* bitmap object */
|
||||
|
|
|
@ -301,7 +301,7 @@ NtGdiExtCreatePen(
|
|||
|
||||
if (dwStyleCount > 0)
|
||||
{
|
||||
pSafeStyle = ExAllocatePoolWithTag(NonPagedPool, dwStyleCount * sizeof(DWORD), TAG_EXTPEN);
|
||||
pSafeStyle = ExAllocatePoolWithTag(NonPagedPool, dwStyleCount * sizeof(DWORD), TAG_PENSTYLES);
|
||||
if (!pSafeStyle)
|
||||
{
|
||||
SetLastNtError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
|
@ -338,7 +338,12 @@ NtGdiExtCreatePen(
|
|||
cjDIB,
|
||||
bOldStylePen,
|
||||
hBrush);
|
||||
// BRUSH_Cleanup takes care of pSafeStyle
|
||||
|
||||
if (!hPen && pSafeStyle)
|
||||
{
|
||||
ExFreePool(pSafeStyle);
|
||||
}
|
||||
// BRUSH_Cleanup takes care of pSafeStyle when deleteing the pen
|
||||
return hPen;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue