No need to test for NULL before a free.
authorRémi Duraffort <ivoire@videolan.org>
Thu, 8 Oct 2009 14:26:07 +0000 (16:26 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 10 Oct 2009 09:26:49 +0000 (11:26 +0200)
modules/codec/kate.c
modules/misc/quartztext.c
modules/stream_filter/rar.c
modules/stream_out/smem.c
src/input/decoder.c

index 871bcd7..6051554 100644 (file)
@@ -1482,8 +1482,7 @@ static void DecSysRelease( decoder_sys_t *p_sys )
 #ifdef HAVE_TIGER
     if( p_sys->p_tr )
         tiger_renderer_destroy( p_sys->p_tr );
-    if( p_sys->psz_tiger_default_font_desc )
-        free( p_sys->psz_tiger_default_font_desc );
+    free( p_sys->psz_tiger_default_font_desc );
 #endif
 
     if (p_sys->b_ready)
index 0f332c7..c6100d3 100644 (file)
@@ -506,7 +506,7 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
         {
             if( !strcasecmp( "face", psz_name ) )
             {
-                if( psz_fontname ) free( psz_fontname );
+                free( psz_fontname );
                 psz_fontname = strdup( psz_value );
             }
             else if( !strcasecmp( "size", psz_name ) )
index 5c34333..b2ddc84 100644 (file)
@@ -238,8 +238,7 @@ static int Peek( stream_t *s, const uint8_t **pp_peek, unsigned int i_peek )
         return i_read;
     }
 
-    if( p_sys->p_peek_alloc )
-        free( p_sys->p_peek_alloc );
+    free( p_sys->p_peek_alloc );
 
     p_sys->p_peek_alloc =
     p_sys->p_peek       = p_peek;
index 236639d..9c8b4cc 100644 (file)
@@ -317,8 +317,7 @@ static sout_stream_id_t *AddAudio( sout_stream_t *p_stream, es_format_t *p_fmt )
 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 {
     VLC_UNUSED( p_stream );
-    if ( id != NULL )
-        free( id );
+    free( id );
     return VLC_SUCCESS;
 }
 
index 8385422..ae48f10 100644 (file)
@@ -1730,8 +1730,7 @@ static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block )
             p_owner->sout.i_id = p_dec->fmt_in.i_id;
             if( p_dec->fmt_in.psz_language )
             {
-                if( p_owner->sout.psz_language )
-                    free( p_owner->sout.psz_language );
+                free( p_owner->sout.psz_language );
                 p_owner->sout.psz_language =
                     strdup( p_dec->fmt_in.psz_language );
             }