[vlc-commits] Freetype: fix double-free in error path
Jean-Baptiste Kempf
git at videolan.org
Mon Oct 10 00:00:38 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Oct 10 00:00:14 2011 +0200| [2d4cdd7ab6ec8d58df38558f15d03b36d9c888ef] | committer: Jean-Baptiste Kempf
Freetype: fix double-free in error path
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d4cdd7ab6ec8d58df38558f15d03b36d9c888ef
---
modules/text_renderer/freetype.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 069e01d..fe14eda 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -2594,9 +2594,6 @@ static int Create( vlc_object_t *p_this )
psz_fontfile ? psz_fontfile : "(null)" );
goto error;
}
-#ifdef HAVE_STYLES
- free( psz_fontfile );
-#endif
i_error = FT_Select_Charmap( p_sys->p_face, ft_encoding_unicode );
if( i_error )
@@ -2627,6 +2624,10 @@ static int Create( vlc_object_t *p_this )
LoadFontsFromAttachments( p_filter );
+#ifdef HAVE_STYLES
+ free( psz_fontfile );
+#endif
+
return VLC_SUCCESS;
error:
More information about the vlc-commits
mailing list