]> granicus.if.org Git - libass/commitdiff
font: fix double frees if opening memory font fails
authorwm4 <wm4@nowhere>
Mon, 31 Aug 2015 10:03:37 +0000 (12:03 +0200)
committerwm4 <wm4@nowhere>
Mon, 31 Aug 2015 10:03:37 +0000 (12:03 +0200)
Apparently, libfreetype calls close_stream_font through the
FT_Stream.close callback.

libass/ass_font.c

index 0ba79ad2d491114c6f54d4c199c155dce46acf42..0164b679de9b42d359c58d9b45ab06e28c5d03db 100644 (file)
@@ -179,8 +179,6 @@ static int add_face(ASS_FontSelector *fontsel, ASS_Font *font, uint32_t ch)
             ass_msg(font->library, MSGL_WARN,
                     "Error opening memory font: '%s'", path);
             free(path);
-            free(ftstream);
-            free(fs);
             return -1;
         }