shithub: freetype+ttf2subf

Download patch

ref: 65d89804915a77ec153a713595397d9a37673c15
parent: 24a1fcdfce4e3c1d83596c691b2d2545e380a46e
author: Bungeman <[email protected]>
date: Thu Oct 15 19:50:16 EDT 2015

[bdf] Fix memory leak (#46213).

* src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
case of error.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-15  Bungeman  <[email protected]>
+
+	[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  <[email protected]>
 
 	[truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -2531,7 +2531,7 @@
         /* Error happened while parsing header. */
         FT_ERROR(( "bdf_load_font: " ERRMSG2, lineno ));
         error = FT_THROW( Corrupted_Font_Header );
-        goto Exit;
+        goto Fail;
       }
       else
       {
@@ -2538,7 +2538,7 @@
         /* Error happened when parsing glyphs. */
         FT_ERROR(( "bdf_load_font: " ERRMSG3, lineno ));
         error = FT_THROW( Corrupted_Font_Glyphs );
-        goto Exit;
+        goto Fail;
       }
     }