diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-01 10:17:22 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-01 10:17:22 +0000 |
commit | b125a3188603284e1bc753cc6d2fdc2057749f4c (patch) | |
tree | b8614a050bcfd3b705add080e08138cab4d87d99 /libvo | |
parent | d7676e783e0cc1b8a1ae7fad02661b9c26fd83dd (diff) |
Fix memleak when using fontconfig without a font name.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29607 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/font_load_ft.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index ddaf598069..fe3845f7a9 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -1157,10 +1157,8 @@ void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_n #ifdef CONFIG_FONTCONFIG if (font_fontconfig > 0) { - if (!font_name) - font_name = strdup("sans-serif"); FcInit(); - fc_pattern = FcNameParse(font_name); + fc_pattern = FcNameParse(font_name ? font_name : "sans-serif"); FcConfigSubstitute(0, fc_pattern, FcMatchPattern); FcDefaultSubstitute(fc_pattern); fc_pattern2 = fc_pattern; |