[vlc-commits] freetype: fix font string leak

Francois Cartegnie git at videolan.org
Thu Dec 8 12:27:42 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec  8 12:24:58 2016 +0100| [35956340cc024883aca152667a0021f00263ab97] | committer: Francois Cartegnie

freetype: fix font string leak

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35956340cc024883aca152667a0021f00263ab97
---

 modules/text_renderer/freetype/freetype.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index fd3f813..de833a2 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -937,6 +937,7 @@ static void FillDefaultStyles( filter_t *p_filter )
 {
     filter_sys_t *p_sys = p_filter->p_sys;
 
+    p_sys->p_default_style->psz_fontname = var_InheritString( p_filter, "freetype-font" );
     /* Set default psz_fontname */
     if( !p_sys->p_default_style->psz_fontname || !*p_sys->p_default_style->psz_fontname )
     {
@@ -948,6 +949,7 @@ static void FillDefaultStyles( filter_t *p_filter )
 #endif
     }
 
+    p_sys->p_default_style->psz_monofontname = var_InheritString( p_filter, "freetype-monofont" );
     /* set default psz_monofontname */
     if( !p_sys->p_default_style->psz_monofontname || !*p_sys->p_default_style->psz_monofontname )
     {
@@ -961,9 +963,6 @@ static void FillDefaultStyles( filter_t *p_filter )
 
     UpdateDefaultLiveStyles( p_filter );
 
-    p_sys->p_default_style->psz_fontname = var_InheritString( p_filter, "freetype-font" );
-    p_sys->p_default_style->psz_monofontname = var_InheritString( p_filter, "freetype-monofont" );
-
     p_sys->p_default_style->i_font_alpha = var_InheritInteger( p_filter, "freetype-opacity" );
 
     p_sys->p_default_style->i_outline_alpha = var_InheritInteger( p_filter, "freetype-outline-opacity" );



More information about the vlc-commits mailing list