]> granicus.if.org Git - libass/commitdiff
Fix leaking of script-embedded fonts
authorGrigori Goronzy <greg@blackbox>
Mon, 9 Aug 2010 01:06:42 +0000 (03:06 +0200)
committerGrigori Goronzy <greg@blackbox>
Mon, 9 Aug 2010 03:57:38 +0000 (05:57 +0200)
libass/ass.c

index c5d9d3b7cabe230453c0fb8bbc468b7feea77655..27df596503af62bce1f93db3cd055cf6891a1ecf 100644 (file)
@@ -674,12 +674,10 @@ static int decode_font(ASS_Track *track)
     if (track->library->extract_fonts) {
         ass_add_font(track->library, track->parser_priv->fontname,
                      (char *) buf, dsize);
-        buf = 0;
     }
 
-  error_decode_font:
-    if (buf)
-        free(buf);
+error_decode_font:
+    free(buf);
     free(track->parser_priv->fontname);
     free(track->parser_priv->fontdata);
     track->parser_priv->fontname = 0;