]> granicus.if.org Git - libass/commitdiff
fontselect: fix memory leak
authorGrigori Goronzy <greg@chown.ath.cx>
Mon, 7 Sep 2015 10:08:08 +0000 (12:08 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Mon, 7 Sep 2015 10:08:08 +0000 (12:08 +0200)
Introduced by commit d6bb9af6. Found by coverity scan.

libass/ass_fontselect.c

index d48b1704151975575a3a6c024b72ad461c730106..de3b3abeb3639d5b08fbcef905e8fcba0d750d3f 100644 (file)
@@ -682,7 +682,7 @@ char *ass_font_select(ASS_FontSelector *priv, ASS_Library *library,
     }
 
     if (!res && priv->path_default) {
-        res = strdup(priv->path_default);
+        res = priv->path_default;
         *index = priv->index_default;
         ass_msg(library, MSGL_WARN, "fontselect: Using default font: "
                 "(%s, %d, %d) -> %s, %d, %s", family, bold, italic,