mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 23:32:58 +00:00
[WIN32K]
Fix path reference leaks in PATH_add_outline Should fix failed assertion when closing google earth. thanks to r3ddr4g0n for providing the neccessary debug info. svn path=/trunk/; revision=56342
This commit is contained in:
parent
dee532ddce
commit
4ef8986a9a
1 changed files with 9 additions and 4 deletions
|
@ -2005,10 +2005,12 @@ PATH_add_outline(PDC dc, INT x, INT y, TTPOLYGONHEADER *header, DWORD size)
|
||||||
PPATH pPath;
|
PPATH pPath;
|
||||||
TTPOLYGONHEADER *start;
|
TTPOLYGONHEADER *start;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
|
BOOL bResult = FALSE;
|
||||||
|
|
||||||
start = header;
|
start = header;
|
||||||
|
|
||||||
pPath = PATH_LockPath(dc->dclevel.hPath);
|
pPath = PATH_LockPath(dc->dclevel.hPath);
|
||||||
|
if (!pPath)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -2020,7 +2022,7 @@ PATH_add_outline(PDC dc, INT x, INT y, TTPOLYGONHEADER *header, DWORD size)
|
||||||
if (header->dwType != TT_POLYGON_TYPE)
|
if (header->dwType != TT_POLYGON_TYPE)
|
||||||
{
|
{
|
||||||
DPRINT1("Unknown header type %d\n", header->dwType);
|
DPRINT1("Unknown header type %d\n", header->dwType);
|
||||||
return FALSE;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
pt.x = x + int_from_fixed(header->pfxStart.x);
|
pt.x = x + int_from_fixed(header->pfxStart.x);
|
||||||
|
@ -2055,7 +2057,7 @@ PATH_add_outline(PDC dc, INT x, INT y, TTPOLYGONHEADER *header, DWORD size)
|
||||||
POINTFX ptfx;
|
POINTFX ptfx;
|
||||||
POINT *pts = ExAllocatePoolWithTag(PagedPool, (curve->cpfx + 1) * sizeof(POINT), TAG_PATH);
|
POINT *pts = ExAllocatePoolWithTag(PagedPool, (curve->cpfx + 1) * sizeof(POINT), TAG_PATH);
|
||||||
|
|
||||||
if (!pts) return FALSE;
|
if (!pts) goto cleanup;
|
||||||
|
|
||||||
ptfx = *(POINTFX *)((char *)curve - sizeof(POINTFX));
|
ptfx = *(POINTFX *)((char *)curve - sizeof(POINTFX));
|
||||||
|
|
||||||
|
@ -2076,7 +2078,7 @@ PATH_add_outline(PDC dc, INT x, INT y, TTPOLYGONHEADER *header, DWORD size)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("Unknown curve type %04x\n", curve->wType);
|
DPRINT1("Unknown curve type %04x\n", curve->wType);
|
||||||
return FALSE;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
curve = (TTPOLYCURVE *)&curve->apfx[curve->cpfx];
|
curve = (TTPOLYCURVE *)&curve->apfx[curve->cpfx];
|
||||||
|
@ -2084,9 +2086,12 @@ PATH_add_outline(PDC dc, INT x, INT y, TTPOLYGONHEADER *header, DWORD size)
|
||||||
header = (TTPOLYGONHEADER *)((char *)header + header->cb);
|
header = (TTPOLYGONHEADER *)((char *)header + header->cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bResult = TRUE;
|
||||||
|
|
||||||
|
cleanup:
|
||||||
IntGdiCloseFigure( pPath );
|
IntGdiCloseFigure( pPath );
|
||||||
PATH_UnlockPath( pPath );
|
PATH_UnlockPath( pPath );
|
||||||
return TRUE;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue