Commit 2d4cdd7a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Freetype: fix double-free in error path

parent f78dcacc
...@@ -2594,9 +2594,6 @@ static int Create( vlc_object_t *p_this ) ...@@ -2594,9 +2594,6 @@ static int Create( vlc_object_t *p_this )
psz_fontfile ? psz_fontfile : "(null)" ); psz_fontfile ? psz_fontfile : "(null)" );
goto error; goto error;
} }
#ifdef HAVE_STYLES
free( psz_fontfile );
#endif
i_error = FT_Select_Charmap( p_sys->p_face, ft_encoding_unicode ); i_error = FT_Select_Charmap( p_sys->p_face, ft_encoding_unicode );
if( i_error ) if( i_error )
...@@ -2627,6 +2624,10 @@ static int Create( vlc_object_t *p_this ) ...@@ -2627,6 +2624,10 @@ static int Create( vlc_object_t *p_this )
LoadFontsFromAttachments( p_filter ); LoadFontsFromAttachments( p_filter );
#ifdef HAVE_STYLES
free( psz_fontfile );
#endif
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment