summaryrefslogtreecommitdiffstats
path: root/libass/ass_fontselect.c
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2015-09-07 11:06:17 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-09-07 11:07:27 +0200
commitd6bb9af645526a810512eaf2c65252ac0e0e6b36 (patch)
treef421fa82ffeec2c8a4fd10a3a17f6d87fd6977a6 /libass/ass_fontselect.c
parentaf6a9194b19f3073e7044c48635f1adc332fca05 (diff)
downloadlibass-d6bb9af645526a810512eaf2c65252ac0e0e6b36.tar.bz2
libass-d6bb9af645526a810512eaf2c65252ac0e0e6b36.tar.xz
fontselect: get rid of strdup for display name
The name is always pulled from the font info, which is static, so there is no need to strdup.
Diffstat (limited to 'libass/ass_fontselect.c')
-rw-r--r--libass/ass_fontselect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c
index 2be6549..d48b170 100644
--- a/libass/ass_fontselect.c
+++ b/libass/ass_fontselect.c
@@ -564,11 +564,11 @@ find_font(ASS_FontSelector *priv, ASS_Library *library,
// used for display purposes so it doesn't matter that much,
// though.
if (selected->postscript_name)
- result = strdup(selected->postscript_name);
+ result = selected->postscript_name;
else
- result = strdup(selected->families[0]);
+ result = selected->families[0];
} else
- result = strdup(selected->path);
+ result = selected->path;
}
return result;