[bdf] Fix memory leak (#46213).

* src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
case of error.
This commit is contained in:
Bungeman 2015-10-15 23:50:16 +02:00 committed by Werner Lemberg
parent 24a1fcdfce
commit 65d8980491
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2015-10-15 Bungeman <bungeman@gmail.com>
[bdf] Fix memory leak (#46213).
* src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
case of error.
2015-10-15 Werner Lemberg <wl@gnu.org>
[truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).

View File

@ -2531,14 +2531,14 @@
/* Error happened while parsing header. */
FT_ERROR(( "bdf_load_font: " ERRMSG2, lineno ));
error = FT_THROW( Corrupted_Font_Header );
goto Exit;
goto Fail;
}
else
{
/* Error happened when parsing glyphs. */
FT_ERROR(( "bdf_load_font: " ERRMSG3, lineno ));
error = FT_THROW( Corrupted_Font_Glyphs );
goto Exit;
goto Fail;
}
}