* src/truetype/ttxgvar.c (ft_var_load_avar): Do free arrays in case
of error -- `avar' is optional so we can't rely on tt_done_blend being called automatically.
This commit is contained in:
parent
19b42a5c3a
commit
ee6e92c28e
|
@ -1,3 +1,9 @@
|
|||
2004-05-10 George Williams <gww@silcom.com>
|
||||
|
||||
* src/truetype/ttxgvar.c (ft_var_load_avar): Do free arrays in case
|
||||
of error -- `avar' is optional so we can't rely on tt_done_blend
|
||||
being called automatically.
|
||||
|
||||
2004-05-09 George Williams <gww@silcom.com>
|
||||
|
||||
* src/truetype/ttxgvar.c (ft_var_load_avar, ft_var_load_gvar): Fix
|
||||
|
|
|
@ -304,7 +304,17 @@
|
|||
{
|
||||
segment->pairCount = FT_GET_USHORT();
|
||||
if ( FT_NEW_ARRAY( segment->correspondence, segment->pairCount ) )
|
||||
{
|
||||
/* Failure. Free everything we have done so far. We must do */
|
||||
/* it right now since loading the `avar' table is optional. */
|
||||
|
||||
for ( j = i - 1; j >= 0; --j )
|
||||
FT_FREE( blend->avar_segment[j].correspondence );
|
||||
|
||||
FT_FREE( blend->avar_segment );
|
||||
blend->avar_segment = NULL;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
for ( j = 0; j < segment->pairCount; ++j )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue