[cff] Fix memory leak.

* src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
case of errors.
This commit is contained in:
Werner Lemberg 2010-06-27 13:03:54 +02:00
parent e9f0cdb6c0
commit 4f7851e3d2
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2010-06-27 Werner Lemberg <wl@gnu.org>
[cff] Fix memory leak.
* src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
case of errors.
2010-06-27 Werner Lemberg <wl@gnu.org>
[cff] Protect against invalid `hintmask' and `cntrmask' operators.

View File

@ -811,10 +811,10 @@
charstring_len );
decoder->seac = FALSE;
cff_free_glyph_data( face, &charstring, charstring_len );
if ( error )
goto Exit;
cff_free_glyph_data( face, &charstring, charstring_len );
}
/* Save the left bearing, advance and glyph width of the base */
@ -841,10 +841,10 @@
charstring_len );
decoder->seac = FALSE;
cff_free_glyph_data( face, &charstring, charstring_len );
if ( error )
goto Exit;
cff_free_glyph_data( face, &charstring, charstring_len );
}
/* Restore the left side bearing, advance and glyph width */