Browse Source

Freetype: fix double-free in error path

pull/2/head
Jean-Baptiste Kempf 15 years ago
parent
commit
2d4cdd7ab6
  1. 7
      modules/text_renderer/freetype.c

7
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:

Loading…
Cancel
Save