]> granicus.if.org Git - libass/commitdiff
fontselect: fix yet another memory leak
authorGrigori Goronzy <greg@chown.ath.cx>
Tue, 1 Sep 2015 12:37:57 +0000 (14:37 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Tue, 1 Sep 2015 12:37:57 +0000 (14:37 +0200)
libass/ass_fontselect.c

index 955d5f6dae3f74b5b7e348e2cb52e010c6732018..95d8c9594fe29488a1904a0efc2c548082432f9a 100644 (file)
@@ -589,6 +589,8 @@ static char *select_font(ASS_FontSelector *priv, ASS_Library *library,
 
     free(family_trim);
     if (meta.fullnames != default_meta.fullnames) {
+        for (int i = 0; i < meta.n_fullname; i++)
+            free(meta.fullnames[i]);
         free(meta.fullnames);
     }