freetype: simplify
authorPierre Ynard <linkfanel@yahoo.fr>
Wed, 16 Sep 2009 10:33:43 +0000 (12:33 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Wed, 16 Sep 2009 10:33:43 +0000 (12:33 +0200)
modules/misc/freetype.c

index c5d291d..b00a50c 100644 (file)
@@ -323,11 +323,10 @@ static int Create( vlc_object_t *p_this )
     fontindex=0;
     if( !psz_fontfamily || !*psz_fontfamily )
     {
+        free( psz_fontfamily );
 #ifdef HAVE_FONTCONFIG
-        free( psz_fontfamily);
         psz_fontfamily=strdup( DEFAULT_FONT );
 #else
-        free( psz_fontfamily );
         psz_fontfamily = (char *)malloc( PATH_MAX + 1 );
         if( !psz_fontfamily )
             goto error;