[bdf] Fix memory leak (#46213).
* src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
case of error.
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;
}
}