Changeset 6411526fe052a033300e73045b07c0aaee089e88

Show
Ignore:
Timestamp:
14/03/08 00:28:31 (7 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1205450911 +0100
git-parent:

[5cb4066e102b6c6e89ab890439c5bf9c74703262]

git-author:
Rémi Duraffort <ivoire@videolan.org> 1205450640 +0100
Message:

One more removing session. (useless test before a free())

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/control/http/http.c

    rb4c3135 r6411526  
    202202        } 
    203203    } 
    204     if( psz_src != NULL ) 
    205         free( psz_src ); 
     204    free( psz_src ); 
    206205#endif 
    207206 
     
    276275        unsigned i; 
    277276 
    278         if( psz_src != NULL ) 
    279         { 
    280             free( psz_src ); 
    281             psz_src = NULL; 
    282         } 
     277        free( psz_src ); 
     278        psz_src = NULL; 
    283279 
    284280        for( i = 0; ppsz_paths[i] != NULL; i++ ) 
     
    373369        free( p_sys->pp_files[i] ); 
    374370    } 
    375     if( p_sys->pp_files ) 
    376     { 
    377         free( p_sys->pp_files ); 
    378     } 
     371    free( p_sys->pp_files ); 
    379372    for( i = 0; i < p_sys->i_handlers; i++ ) 
    380373    { 
     
    795788    TAB_REMOVE( p_args->p_association->i_argc, p_args->p_association->ppsz_argv, 
    796789                psz_file ); 
    797     if( psz_cwd != NULL ) 
    798         free( psz_cwd ); 
     790    free( psz_cwd ); 
    799791    while( i_env ) 
    800792        TAB_REMOVE( i_env, ppsz_env, ppsz_env[0] ); 
  • modules/control/http/util.c

    r99fab90 r6411526  
    329329    } 
    330330 
    331     if( user ) 
    332     { 
    333         free( user ); 
    334     } 
    335     if( password ) 
    336     { 
    337         free( password ); 
    338     } 
     331    free( user ); 
     332    free( password ); 
    339333 
    340334    ACL_Destroy( p_acl ); 
  • modules/control/lirc.c

    r99fab90 r6411526  
    124124 
    125125    /* Destroy structure */ 
    126     if( p_intf->p_sys->psz_file ) 
    127         free( p_intf->p_sys->psz_file ); 
     126    free( p_intf->p_sys->psz_file ); 
    128127    lirc_freeconfig( p_intf->p_sys->config ); 
    129128    lirc_deinit(); 
  • modules/control/ntservice.c

    r99fab90 r6411526  
    197197        strcat( psz_path, psz_extra ); 
    198198    } 
    199     if( psz_extra ) free( psz_extra ); 
     199    free( psz_extra ); 
    200200 
    201201    psz_extra = config_GetPsz( p_intf, "ntservice-options" ); 
     
    205205        strcat( psz_path, psz_extra ); 
    206206    } 
    207     if( psz_extra ) free( psz_extra ); 
     207    free( psz_extra ); 
    208208 
    209209    SC_HANDLE service = 
     
    339339        } 
    340340    } 
    341     if( psz_modules ) 
    342     { 
    343         free( psz_modules ); 
    344     } 
     341    free( psz_modules ); 
    345342 
    346343    /* Initialization complete - report running status */ 
  • modules/demux/flac.c

    ra78e273 r6411526  
    151151    if( !p_sys->p_packetizer->p_module ) 
    152152    { 
    153         if( p_sys->p_packetizer->fmt_in.p_extra ) 
    154             free( p_sys->p_packetizer->fmt_in.p_extra ); 
     153        free( p_sys->p_packetizer->fmt_in.p_extra ); 
    155154        vlc_object_release( p_sys->p_packetizer ); 
    156155 
     
    190189    module_Unneed( p_sys->p_packetizer, p_sys->p_packetizer->p_module ); 
    191190 
    192     if( p_sys->p_packetizer->fmt_in.p_extra ) 
    193         free( p_sys->p_packetizer->fmt_in.p_extra ); 
     191    free( p_sys->p_packetizer->fmt_in.p_extra ); 
    194192 
    195193    /* Delete the decoder */ 
     
    713711    } 
    714712error: 
    715     if( psz_mime ) 
    716         free( psz_mime ); 
    717     if( psz_description ) 
    718         free( psz_description ); 
     713    free( psz_mime ); 
     714    free( psz_description ); 
    719715} 
    720716#undef RM 
  • modules/demux/mjpeg.c

    r99fab90 r6411526  
    512512    demux_sys_t *p_sys  = p_demux->p_sys; 
    513513 
    514     if( p_sys->psz_separator ) 
    515     { 
    516         free( p_sys->psz_separator ); 
    517     } 
     514    free( p_sys->psz_separator ); 
    518515    free( p_sys ); 
    519516} 
  • modules/demux/mp4/libmp4.c

    r8632e67 r6411526  
    12091209    if( p_box->i_type == FOURCC_alac ) 
    12101210    { 
    1211         if( p_box->data.p_sample_soun->p_qt_description ) 
    1212             free( p_box->data.p_sample_soun->p_qt_description ); 
     1211        free( p_box->data.p_sample_soun->p_qt_description ); 
    12131212 
    12141213        p_box->data.p_sample_soun->p_qt_description = malloc( i_read ); 
  • modules/demux/nuv.c

    r99fab90 r6411526  
    317317    demux_sys_t    *p_sys = p_demux->p_sys; 
    318318 
    319     if( p_sys->p_extra_f ) 
    320         free( p_sys->p_extra_f ); 
     319    free( p_sys->p_extra_f ); 
    321320    demux_IndexClean( &p_sys->idx ); 
    322321    free( p_sys ); 
     
    645644static void demux_IndexClean( demux_index_t *p_idx ) 
    646645{ 
    647     if( p_idx->idx ) 
    648     { 
    649         free( p_idx->idx ); 
    650         p_idx->idx = NULL; 
    651     } 
     646    free( p_idx->idx ); 
     647    p_idx->idx = NULL; 
    652648} 
    653649static void demux_IndexAppend( demux_index_t *p_idx, 
  • modules/demux/playlist/itml.h

    rdbddc5a r6411526  
    2727 
    2828/* defines */ 
    29 #define FREE(v)        if (v) {free(v);v=NULL;} 
    30 #define FREE_NAME()    if (psz_name) {free(psz_name);psz_name=NULL;} 
    31 #define FREE_VALUE()   if (psz_value) {free(psz_value);psz_value=NULL;} 
    32 #define FREE_KEY()     if (psz_key) {free(psz_key);psz_key=NULL;} 
     29#define FREE(v)        free(v);v=NULL; 
     30#define FREE_NAME()    free(psz_name);psz_name=NULL; 
     31#define FREE_VALUE()   free(psz_value);psz_value=NULL; 
     32#define FREE_KEY()     free(psz_key);psz_key=NULL; 
    3333#define FREE_ATT()     FREE_NAME();FREE_VALUE() 
    3434#define FREE_ATT_KEY() FREE_NAME();FREE_VALUE();FREE_KEY() 
  • modules/demux/playlist/pls.c

    r656fa1a r6411526  
    7474{ 
    7575    demux_t *p_demux = (demux_t *)p_this; 
    76     if( p_demux->p_sys->psz_prefix ) 
    77     { 
    78         free( p_demux->p_sys->psz_prefix ); 
    79     } 
     76    free( p_demux->p_sys->psz_prefix ); 
    8077    free( p_demux->p_sys ); 
    8178} 
     
    173170                msg_Warn( p_demux, "no file= part found for item %d", i_item ); 
    174171            } 
    175             if( psz_name ) 
    176             { 
    177                 free( psz_name ); 
    178                 psz_name = NULL; 
    179             } 
     172            free( psz_name ); 
     173            psz_name = NULL; 
    180174            i_duration = -1; 
    181175            i_item = i_new_item; 
     
    185179            !strncasecmp( psz_key, "Ref", sizeof("Ref") -1 ) ) 
    186180        { 
    187             if( psz_mrl_orig ) 
    188                 free( psz_mrl_orig ); 
     181            free( psz_mrl_orig ); 
    189182            psz_mrl_orig = 
    190183            psz_mrl = E_(ProcessMRL)( psz_value, p_demux->p_sys->psz_prefix ); 
     
    203196        else if( !strncasecmp( psz_key, "title", sizeof("title") -1 ) ) 
    204197        { 
    205             if( psz_name ) 
    206                 free( psz_name ); 
     198            free( psz_name ); 
    207199            psz_name = strdup( psz_value ); 
    208200        } 
     
    235227        msg_Warn( p_demux, "no file= part found for item %d", i_item ); 
    236228    } 
    237     if( psz_name ) 
    238     { 
    239         free( psz_name ); 
    240         psz_name = NULL; 
    241     } 
     229    free( psz_name ); 
     230    psz_name = NULL; 
    242231 
    243232    HANDLE_PLAY_AND_RELEASE; 
  • modules/demux/subtitle_asa.c

    r53783dc r6411526  
    311311 
    312312    for( i = 0; i < p_sys->i_subtitles; i++ ) 
    313     { 
    314         if( p_sys->subtitle[i].psz_text ) 
    315             free( p_sys->subtitle[i].psz_text ); 
    316     } 
    317     if( p_sys->subtitle ) 
    318         free( p_sys->subtitle ); 
     313        free( p_sys->subtitle[i].psz_text ); 
     314    free( p_sys->subtitle ); 
    319315 
    320316    free( p_sys ); 
  • modules/demux/ts.c

    reebf82e r6411526  
    24002400            else 
    24012401            { 
    2402                 if( es_descr.dec_descr.p_decoder_specific_info != NULL ) 
    2403                 { 
    2404                     free( es_descr.dec_descr.p_decoder_specific_info ); 
    2405                     es_descr.dec_descr.p_decoder_specific_info = NULL; 
    2406                     es_descr.dec_descr.i_decoder_specific_info_len = 0; 
    2407                 } 
     2402                free( es_descr.dec_descr.p_decoder_specific_info ); 
     2403                es_descr.dec_descr.p_decoder_specific_info = NULL; 
     2404                es_descr.dec_descr.i_decoder_specific_info_len = 0; 
    24082405            } 
    24092406        } 
  • modules/demux/ty.c

    r99fab90 r6411526  
    546546    cc_Exit( &p_sys->cc ); 
    547547    free( p_sys->rec_hdrs ); 
    548     if( p_sys->seq_table ) 
    549         free( p_sys->seq_table ); 
     548    free( p_sys->seq_table ); 
    550549    free(p_sys); 
    551550} 
     
    11281127{ 
    11291128    /* */ 
    1130     if( h->meta.psz_channel_name ) 
    1131         free( h->meta.psz_channel_name ); 
    1132     if( h->meta.psz_channel_call_letter ) 
    1133         free( h->meta.psz_channel_call_letter ); 
    1134     if( h->meta.psz_channel_number ) 
    1135         free( h->meta.psz_channel_number ); 
     1129    free( h->meta.psz_channel_name ); 
     1130    free( h->meta.psz_channel_call_letter ); 
     1131    free( h->meta.psz_channel_number ); 
    11361132 
    11371133    /* */ 
    1138     if( h->meta.current.psz_name ) 
    1139         free( h->meta.current.psz_name ); 
    1140     if( h->meta.current.psz_rating ) 
    1141         free( h->meta.current.psz_rating ); 
     1134    free( h->meta.current.psz_name ); 
     1135    free( h->meta.current.psz_rating ); 
    11421136    /* */ 
    1143     if( h->meta.future.psz_name ) 
    1144         free( h->meta.future.psz_name ); 
    1145     if( h->meta.future.psz_rating ) 
    1146         free( h->meta.future.psz_rating ); 
     1137    free( h->meta.future.psz_name ); 
     1138    free( h->meta.future.psz_rating ); 
    11471139} 
    11481140static void XdsStringUtf8( char dst[2*32+1], const uint8_t *p_src, int i_src ) 
     
    11801172        return VLC_FALSE; 
    11811173 
    1182     if( *ppsz_dst ) 
    1183         free( *ppsz_dst ); 
     1174    free( *ppsz_dst ); 
    11841175    if( psz_new ) 
    11851176        *ppsz_dst = strdup( psz_new ); 
     
    16421633 
    16431634    /* clear the SEQ table */ 
    1644     if (p_sys->seq_table != NULL) 
    1645         free(p_sys->seq_table); 
     1635    free(p_sys->seq_table); 
    16461636     
    16471637    /* parse header info */ 
     
    19011891    /*msg_Dbg( p_demux, "chunk has %d records", i_num_recs );*/ 
    19021892 
    1903     if (p_sys->rec_hdrs) 
    1904         free(p_sys->rec_hdrs); 
     1893    free(p_sys->rec_hdrs); 
    19051894 
    19061895    /* skip past the 4 bytes we "peeked" earlier */