mirror of https://github.com/freetype/freetype
* src/bdf/bdflib.c (bdf_load_font): Fix memory leaks in case of
errors.
This commit is contained in:
parent
7d48cb06b4
commit
b10e45a7fb
|
@ -1,3 +1,8 @@
|
|||
2006-06-08 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/bdf/bdflib.c (bdf_load_font): Fix memory leaks in case of
|
||||
errors.
|
||||
|
||||
2006-06-07 David Turner <david@freetype.org>
|
||||
|
||||
* src/type1/t1afm.c (KERN_INDEX): Make it more robust.
|
||||
|
|
|
@ -2224,7 +2224,7 @@
|
|||
error = _bdf_readstream( stream, _bdf_parse_start,
|
||||
(void *)p, &lineno );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
goto Fail;
|
||||
|
||||
if ( p->font != 0 )
|
||||
{
|
||||
|
@ -2316,7 +2316,7 @@
|
|||
if ( FT_RENEW_ARRAY( p->font->comments,
|
||||
p->font->comments_len,
|
||||
p->font->comments_len + 1 ) )
|
||||
goto Exit;
|
||||
goto Fail;
|
||||
|
||||
p->font->comments[p->font->comments_len] = 0;
|
||||
}
|
||||
|
@ -2337,6 +2337,15 @@
|
|||
}
|
||||
|
||||
return error;
|
||||
|
||||
Fail:
|
||||
bdf_free_font( p->font );
|
||||
|
||||
memory = extmemory;
|
||||
|
||||
FT_FREE( p->font );
|
||||
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue