[bdf] Fix memory leak (#46213). * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in case of error.
diff --git a/ChangeLog b/ChangeLog
index a052aa0..b63e657 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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).
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index 414deb5..5b1beef 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -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;
}
}