FT1 font driver: leaked buffer if it failed to open a font
authorTony Cook <tony@develop-help.com>
Tue, 23 Feb 2016 10:58:32 +0000 (21:58 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 23 Feb 2016 10:58:32 +0000 (21:58 +1100)
fontft1.c

index 6af95e8da815e2bbec93c79f28479af5b6153e89..d1d92ca2fe9442b91ceb1aa50b20930dbe305b44 100644 (file)
--- a/fontft1.c
+++ b/fontft1.c
@@ -371,6 +371,7 @@ i_tt_new(const char *fontname) {
   /* load the typeface */
   error = TT_Open_Face( tteng->engine, fontname, &handle->face );
   if ( error ) {
+    myfree(handle);
     if ( error == TT_Err_Could_Not_Open_File ) {
       mm_log((1, "Could not find/open %s.\n", fontname ));
     }