Changeset 9630c00c6b310e1a824f0bce00de89f0f777484f

Show
Ignore:
Timestamp:
12/03/08 12:07:42 (7 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1205320062 +0100
git-parent:

[859436564cd0b85e76b888a88205424ede9cb412]

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

Another time "Remove useless test before a free".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/cdda.c

    r0e86a35 r9630c00  
    155155        if( !psz_name || !*psz_name ) 
    156156        { 
    157             if( psz_name ) free( psz_name ); 
     157            free( psz_name ); 
    158158            return VLC_EGENERIC; 
    159159        } 
     
    479479                if( cddb_track_get_title( t )  != NULL ) 
    480480                { 
    481                     if( p_input_item->psz_name ) 
    482                         free( p_input_item->psz_name ); 
     481                    free( p_input_item->psz_name ); 
    483482                    p_input_item->psz_name = strdup( cddb_track_get_title( t ) ); 
    484483                    input_item_SetTitle( p_input_item, cddb_track_get_title( t ) ); 
  • modules/access/cdda/access.c

    r63d9df0 r9630c00  
    307307                             psz_err ? psz_err: "" ); 
    308308 
    309                 if( psz_err ) free( psz_err ); 
    310                 if( psz_mes ) free( psz_mes ); 
     309                free( psz_err ); 
     310                free( psz_mes ); 
    311311                if( !p_readbuf ) 
    312312                { 
     
    401401            char *psz_title = CDDAFormatTitle( p_access, p_cdda->i_track ); 
    402402            input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_title ); 
    403             free(psz_title); 
     403            free( psz_title ); 
    404404        } 
    405405        else 
     
    629629    { 
    630630        msg_Warn( p_access, "could not open %s", psz_source ); 
    631         if ( psz_source ) 
    632             free( psz_source ); 
     631        free( psz_source ); 
    633632        return VLC_EGENERIC; 
    634633    } 
     
    810809 error: 
    811810    cdio_destroy( p_cdda->p_cdio ); 
    812     if( psz_source) free( psz_source ); 
     811    free( psz_source ); 
    813812    if( p_cdda ) 
    814813    { 
     
    858857#endif 
    859858 
    860     if( p_cdda->psz_mcn )    free( p_cdda->psz_mcn ); 
    861     if( p_cdda->psz_source ) free( p_cdda->psz_source ); 
     859    free( p_cdda->psz_mcn ); 
     860    free( p_cdda->psz_source ); 
    862861 
    863862#if LIBCDDB_VERSION_NUM >= 1 
     
    10071006                    input_Control( p_cdda->p_input, INPUT_SET_NAME, 
    10081007                                   psz_title ); 
    1009                     free(psz_title); 
     1008                    free( psz_title ); 
    10101009                    p_cdda->i_track = i_track; 
    10111010                    i_last_lsn = cdio_get_track_lsn( p_cdda->p_cdio, 
  • modules/access/dc1394.c

    r99fab90 r9630c00  
    629629    CloseAudioDev( p_demux ); 
    630630 
    631     if( p_sys->camera_nodes ) 
    632         free( p_sys->camera_nodes ); 
    633     if( p_sys->audio_device ) 
    634         free( p_sys->audio_device ); 
     631    free( p_sys->camera_nodes ); 
     632    free( p_sys->audio_device ); 
    635633 
    636634    free( p_sys ); 
     
    860858                    "support. It will relased ASAP, until then try an higher size " 
    861859                    "(320x240 and 640x480 are fully supported)" ); 
    862                 free(psz_dup); 
     860                free( psz_dup ); 
    863861                return VLC_EGENERIC; 
    864862#if 0 
     
    887885                    "Please specify one of them. You have specified %s.", 
    888886                    token ); 
    889                 free(psz_dup); 
     887                free( psz_dup ); 
    890888                return VLC_EGENERIC; 
    891889            } 
     
    915913                    "Please specify one of them. You have specified %s.", 
    916914                    token); 
    917                 free(psz_dup); 
     915                free( psz_dup ); 
    918916                return VLC_EGENERIC; 
    919917            } 
     
    930928                                  "must be an unsigned integer.", 
    931929                                  token ); 
    932                 free(psz_dup); 
     930                free( psz_dup ); 
    933931                return VLC_EGENERIC; 
    934932            } 
     
    959957                                  "must be an unsigned integer.", 
    960958                                  token ); 
    961                 free(psz_dup); 
     959                free( psz_dup ); 
    962960                return VLC_EGENERIC; 
    963961            } 
     
    981979                                 "it can be 'raw1394' or 'video1394'.", 
    982980                                token ); 
    983                 free(psz_dup); 
     981                free( psz_dup ); 
    984982                return VLC_EGENERIC; 
    985983            } 
     
    10121010        } 
    10131011    } 
    1014     if( psz_dup ) free( psz_dup ); 
     1012    free( psz_dup ); 
    10151013    return VLC_SUCCESS; 
    10161014} 
  • modules/access/directory.c

    r0e86a35 r9630c00  
    267267    playlist_Signal( p_playlist ); 
    268268 
    269     if( psz_name ) free( psz_name ); 
     269    free( psz_name ); 
    270270    vlc_object_release( p_input ); 
    271271    vlc_object_release( p_playlist ); 
     
    456456        } 
    457457    } 
    458     if( psz_ignore ) free( psz_ignore ); 
     458    free( psz_ignore ); 
    459459 
    460460    /* While we still have entries in the directory */ 
     
    546546 
    547547    for( i = 0; i < i_extensions; i++ ) 
    548         if( ppsz_extensions[i] ) free( ppsz_extensions[i] ); 
    549     if( ppsz_extensions ) free( ppsz_extensions ); 
     548        free( ppsz_extensions[i] ); 
     549    free( ppsz_extensions ); 
    550550 
    551551    for( i = 0; i < i_dir_content; i++ ) 
    552         if( pp_dir_content[i] ) free( pp_dir_content[i] ); 
    553     if( pp_dir_content ) free( pp_dir_content ); 
     552        free( pp_dir_content[i] ); 
     553    free( pp_dir_content ); 
    554554 
    555555    return i_return; 
  • modules/access/dshow/dshow.cpp

    r99fab90 r9630c00  
    334334    var_Get( p_this, "dshow-vdev", &val ); 
    335335    if( val.psz_string ) vdevname = string( val.psz_string ); 
    336     if( val.psz_string ) free( val.psz_string ); 
     336    free( val.psz_string ); 
    337337 
    338338    var_Create( p_this, "dshow-adev", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); 
    339339    var_Get( p_this, "dshow-adev", &val ); 
    340340    if( val.psz_string ) adevname = string( val.psz_string ); 
    341     if( val.psz_string ) free( val.psz_string ); 
     341    free( val.psz_string ); 
    342342 
    343343    static struct {char *psz_size; int  i_width; int  i_height;} size_table[] = 
     
    371371        } 
    372372    } 
    373     if( val.psz_string ) free( val.psz_string ); 
     373    free( val.psz_string ); 
    374374 
    375375    p_sys->b_chroma = VLC_FALSE; 
     
    382382        p_sys->b_chroma = VLC_TRUE; 
    383383    } 
    384     if( val.psz_string ) free( val.psz_string ); 
     384    free( val.psz_string ); 
    385385 
    386386    var_Create( p_this, "dshow-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT ); 
  • modules/access/dvdread.c

    r99fab90 r9630c00  
    230230        putenv( psz_env ); 
    231231    } 
    232     if( psz_dvdcss_env ) free( psz_dvdcss_env ); 
     232    free( psz_dvdcss_env ); 
    233233 
    234234    /* Open dvdread */ 
  • modules/access/ftp.c

    rcf935d5 r9630c00  
    624624    { 
    625625        msg_Err( p_access, "cannot get answer" ); 
    626         if( psz_line ) free( psz_line ); 
     626        free( psz_line ); 
    627627        if( pi_answer ) *pi_answer    = 500; 
    628628        if( ppsz_answer ) *ppsz_answer  = NULL; 
  • modules/access/http.c

    r111dac8 r9630c00  
    357357            if( psz_login ) p_sys->url.psz_username = strdup( psz_login ); 
    358358            if( psz_password ) p_sys->url.psz_password = strdup( psz_password ); 
    359             if( psz_login ) free( psz_login ); 
    360             if( psz_password ) free( psz_password ); 
     359            free( psz_login ); 
     360            free( psz_password ); 
    361361            goto connect; 
    362362        } 
    363363        else 
    364364        { 
    365             if( psz_login ) free( psz_login ); 
    366             if( psz_password ) free( psz_password ); 
     365            free( psz_login ); 
     366            free( psz_password ); 
    367367            goto error; 
    368368        } 
     
    615615                /* read the empty line */ 
    616616                char *psz = net_Gets( VLC_OBJECT(p_access), p_sys->fd, p_sys->p_vs ); 
    617                 if( psz ) free( psz ); 
     617                free( psz ); 
    618618            } 
    619619        } 
     
    713713            strcmp( p_sys->psz_icy_title, &p[1] ) ) 
    714714        { 
    715             if( p_sys->psz_icy_title ) 
    716                 free( p_sys->psz_icy_title ); 
     715            free( p_sys->psz_icy_title ); 
    717716            p_sys->psz_icy_title = strdup( &p[1] ); 
    718717            p_access->info.i_update |= INPUT_UPDATE_META; 
     
    12421241            } 
    12431242 
    1244             if( p_sys->psz_location ) free( p_sys->psz_location ); 
     1243            free( p_sys->psz_location ); 
    12451244            p_sys->psz_location = psz_new_loc; 
    12461245        } 
    12471246        else if( !strcasecmp( psz, "Content-Type" ) ) 
    12481247        { 
    1249             if( p_sys->psz_mime ) free( p_sys->psz_mime ); 
     1248            free( p_sys->psz_mime ); 
    12501249            p_sys->psz_mime = strdup( p ); 
    12511250            msg_Dbg( p_access, "Content-Type: %s", p_sys->psz_mime ); 
     
    12651264            if( !strcasecmp( psz, "Pragma: features" ) ) 
    12661265                p_sys->b_mms = VLC_TRUE; 
    1267             if( p_sys->psz_pragma ) free( p_sys->psz_pragma ); 
     1266            free( p_sys->psz_pragma ); 
    12681267            p_sys->psz_pragma = strdup( p ); 
    12691268            msg_Dbg( p_access, "Pragma: %s", p_sys->psz_pragma ); 
     
    13061305        else if( !strcasecmp( psz, "Icy-Name" ) ) 
    13071306        { 
    1308             if( p_sys->psz_icy_name ) free( p_sys->psz_icy_name ); 
     1307            free( p_sys->psz_icy_name ); 
    13091308            p_sys->psz_icy_name = strdup( p ); 
    13101309            msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name ); 
     
    13161315        else if( !strcasecmp( psz, "Icy-Genre" ) ) 
    13171316        { 
    1318             if( p_sys->psz_icy_genre ) free( p_sys->psz_icy_genre ); 
     1317            free( p_sys->psz_icy_genre ); 
    13191318            p_sys->psz_icy_genre = strdup( p ); 
    13201319            msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre ); 
  • modules/access/jack.c

    r99fab90 r9630c00  
    216216            msg_Err( p_demux, "failed to register a JACK port" ); 
    217217            if( p_sys->p_jack_client) jack_client_close( p_sys->p_jack_client ); 
    218             if( p_sys->pp_jack_port_input ) free( p_sys->pp_jack_port_input ); 
     218            free( p_sys->pp_jack_port_input ); 
    219219            if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); 
    220             if( p_sys->pp_jack_buffer ) free( p_sys->pp_jack_buffer ); 
     220            free( p_sys->pp_jack_buffer ); 
    221221            free( p_sys ); 
    222222            return VLC_EGENERIC; 
     
    241241        msg_Err( p_demux, "failed to activate JACK client" ); 
    242242        if( p_sys->p_jack_client) jack_client_close( p_sys->p_jack_client ); 
    243         if( p_sys->pp_jack_port_input ) free( p_sys->pp_jack_port_input ); 
     243        free( p_sys->pp_jack_port_input ); 
    244244        if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); 
    245         if( p_sys->pp_jack_buffer ) free( p_sys->pp_jack_buffer ); 
     245        free( p_sys->pp_jack_buffer ); 
    246246        free( p_sys ); 
    247247        return VLC_EGENERIC; 
     
    288288            } 
    289289        } 
    290     if( pp_jack_port_output ) free( pp_jack_port_output ); 
     290    free( pp_jack_port_output ); 
    291291    } 
    292292 
     
    328328    if( p_sys->p_jack_client ) jack_client_close( p_sys->p_jack_client ); 
    329329    if( p_sys->p_jack_ringbuffer ) jack_ringbuffer_free( p_sys->p_jack_ringbuffer ); 
    330     if( p_sys->pp_jack_port_input ) free( p_sys->pp_jack_port_input ); 
    331     if( p_sys->pp_jack_buffer ) free( p_sys->pp_jack_buffer ); 
    332     if( p_sys->pp_jack_port_table ) free( p_sys->pp_jack_port_table ); 
     330    free( p_sys->pp_jack_port_input ); 
     331    free( p_sys->pp_jack_buffer ); 
     332    free( p_sys->pp_jack_port_table ); 
    333333    free( p_sys ); 
    334334} 
     
    547547    } 
    548548 
    549     if( pp_jack_port_output ) free( pp_jack_port_output ); 
     549    free( pp_jack_port_output ); 
    550550    p_sys->i_match_ports = i_total_out_ports; 
    551551} 
  • modules/access/rtsp/access.c

    r99fab90 r9630c00  
    132132    else *p_buffer = 0; 
    133133 
    134     if( psz ) free( psz ); 
     134    free( psz ); 
    135135    return 0; 
    136136} 
     
    249249                VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); 
    250250 
    251     if( psz_server ) free( psz_server ); 
     251    free( psz_server ); 
    252252    return VLC_SUCCESS; 
    253253 
    254254 error: 
    255     if( psz_server ) free( psz_server ); 
     255    free( psz_server ); 
    256256    Close( p_this ); 
    257257    return VLC_EGENERIC; 
     
    267267 
    268268    if( p_sys->p_rtsp ) rtsp_close( p_sys->p_rtsp ); 
    269     if( p_sys->p_rtsp ) free( p_sys->p_rtsp ); 
     269    free( p_sys->p_rtsp ); 
    270270    free( p_sys ); 
    271271} 
  • modules/access/rtsp/real.c

    r99fab90 r9630c00  
    481481    if (!desc->stream[i]->mlti_data) { 
    482482      len = 0; 
    483       if( buf ) free( buf ); 
     483      free( buf ); 
    484484      buf = NULL; 
    485485    } else 
     
    532532 
    533533  if( desc ) sdpplin_free( desc ); 
    534   if( buf ) free(buf); 
     534  free( buf ); 
    535535  return header; 
    536536 
     
    538538  if( desc ) sdpplin_free( desc ); 
    539539  if( header ) rmff_free_header( header ); 
    540   if( buf ) free( buf ); 
     540  free( buf ); 
    541541  return NULL; 
    542542} 
     
    643643    } 
    644644    printf( "bou\n"); 
    645     rtsp_send_ok(rtsp_session); 
    646     if( challenge1 ) free(challenge1); 
    647     if( alert ) free(alert); 
    648     if( buf ) free(buf); 
     645    rtsp_send_ok( rtsp_session ); 
     646    free( challenge1 ); 
     647    free( alert ); 
     648    free( buf ); 
    649649    return NULL; 
    650650  } 
     
    725725  rtsp_request_play(rtsp_session,NULL); 
    726726 
    727   if( challenge1 ) free( challenge1 ); 
    728   if( session_id ) free( session_id ); 
    729   if( description ) free(description); 
    730   if( subscribe ) free(subscribe); 
    731   if( buf ) free(buf); 
     727  free( challenge1 ); 
     728  free( session_id ); 
     729  free( description ); 
     730  free( subscribe ); 
     731  free( buf ); 
    732732  return h; 
    733733 
    734734error: 
    735735  if( h ) rmff_free_header( h ); 
    736   if( challenge1 ) free( challenge1 ); 
    737   if( session_id ) free( session_id ); 
    738   if( description ) free(description); 
    739   if( subscribe ) free(subscribe); 
    740   if( buf ) free(buf); 
     736  free( challenge1 ); 
     737  free( session_id ); 
     738  free( description ); 
     739  free( subscribe ); 
     740  free( buf ); 
    741741  return NULL; 
    742742} 
  • modules/access/rtsp/real_rmff.c

    ra89f96d r9630c00  
    384384  mdpr->type_specific_data = malloc(sizeof(char)*type_specific_len); 
    385385  if( !mdpr->type_specific_data ) { 
    386     if( mdpr->stream_name ) free( mdpr->stream_name ); 
     386    free( mdpr->stream_name ); 
    387387    free( mdpr ); 
    388388    return NULL; 
     
    610610  if (!h) return; 
    611611 
    612   if (h->fileheader) free(h->fileheader); 
    613   if (h->prop) free(h->prop); 
    614   if (h->data) free(h->data); 
    615   if (h->cont) { 
    616     free(h->cont->title); 
    617     free(h->cont->author); 
    618     free(h->cont->copyright); 
    619     free(h->cont->comment); 
    620     free(h->cont); 
     612  free( h->fileheader ); 
     613  free( h->prop ); 
     614  free( h->data ); 
     615  if( h->cont ) { 
     616    free( h->cont->title ); 
     617    free( h->cont->author ); 
     618    free( h->cont->copyright ); 
     619    free( h->cont->comment ); 
     620    free( h->cont ); 
    621621  } 
    622622  if (h->streams) { 
  • modules/access/rtsp/real_sdpplin.c

    rbce04f1 r9630c00  
    210210    } 
    211211  } 
    212   if( buf ) free(buf); 
    213   if( decoded )free(decoded)
     212  free( buf ); 
     213  free( decoded)
    214214  return desc; 
    215215 
    216216error: 
    217   if( decoded ) free(decoded); 
    218   if( desc ) free( desc ); 
    219   if( buf ) free( buf ); 
     217  free( decoded ); 
     218  free( desc ); 
     219  free( buf ); 
    220220  return NULL; 
    221221} 
     
    313313  } 
    314314 
    315   free(decoded); 
    316   free(buf); 
     315  free( decoded ); 
     316  free( buf ); 
    317317  return desc; 
    318318} 
     
    326326  for( i=0; i<description->stream_count; i++ ) { 
    327327    if( description->stream[i] ) { 
    328       if( description->stream[i]->id ) free( description->stream[i]->id ); 
    329       if( description->stream[i]->bandwidth ) free( description->stream[i]->bandwidth ); 
    330       if( description->stream[i]->range ) free( description->stream[i]->range ); 
    331       if( description->stream[i]->length ) free( description->stream[i]->length ); 
    332       if( description->stream[i]->rtpmap ) free( description->stream[i]->rtpmap ); 
    333       if( description->stream[i]->mimetype ) free( description->stream[i]->mimetype ); 
    334       if( description->stream[i]->stream_name ) free( description->stream[i]->stream_name ); 
    335       if( description->stream[i]->mime_type ) free( description->stream[i]->mime_type ); 
    336       if( description->stream[i]->mlti_data ) free( description->stream[i]->mlti_data ); 
    337       if( description->stream[i]->rmff_flags ) free( description->stream[i]->rmff_flags ); 
    338       if( description->stream[i]->asm_rule_book ) free( description->stream[i]->asm_rule_book ); 
     328      free( description->stream[i]->id ); 
     329      free( description->stream[i]->bandwidth ); 
     330      free( description->stream[i]->range ); 
     331      free( description->stream[i]->length ); 
     332      free( description->stream[i]->rtpmap ); 
     333      free( description->stream[i]->mimetype ); 
     334      free( description->stream[i]->stream_name ); 
     335      free( description->stream[i]->mime_type ); 
     336      free( description->stream[i]->mlti_data ); 
     337      free( description->stream[i]->rmff_flags ); 
     338      free( description->stream[i]->asm_rule_book ); 
    339339      free( description->stream[i] ); 
    340340    } 
     
    342342  if( description->stream_count ) free( description->stream ); 
    343343 
    344   if( description->owner ) free( description->owner ); 
    345   if( description->session_name ) free( description->session_name ); 
    346   if( description->session_info ) free( description->session_info ); 
    347   if( description->uri ) free( description->uri ); 
    348   if( description->email ) free( description->email ); 
    349   if( description->phone ) free( description->phone ); 
    350   if( description->connection ) free( description->connection ); 
    351   if( description->bandwidth ) free( description->bandwidth ); 
    352   if( description->title ) free( description->title ); 
    353   if( description->author ) free( description->author ); 
    354   if( description->copyright ) free( description->copyright ); 
    355   if( description->keywords ) free( description->keywords ); 
    356   if( description->asm_rule_book ) free( description->asm_rule_book ); 
    357   if( description->abstract ) free( description->abstract ); 
    358   if( description->range ) free( description->range ); 
     344  free( description->owner ); 
     345  free( description->session_name ); 
     346  free( description->session_info ); 
     347  free( description->uri ); 
     348  free( description->email ); 
     349  free( description->phone ); 
     350  free( description->connection ); 
     351  free( description->bandwidth ); 
     352  free( description->title ); 
     353  free( description->author ); 
     354  free( description->copyright ); 
     355  free( description->keywords ); 
     356  free( description->asm_rule_book ); 
     357  free( description->abstract ); 
     358  free( description->range ); 
    359359  free(description); 
    360360} 
  • modules/access/rtsp/rtsp.c

    r99fab90 r9630c00  
    241241          char *buf = malloc( strlen(answer) ); 
    242242          sscanf( answer, "%*s %s", buf ); 
    243           if( rtsp->p_private->server ) free( rtsp->p_private->server ); 
     243          free( rtsp->p_private->server ); 
    244244          rtsp->p_private->server = buf; 
    245245      } 
     
    560560    } 
    561561 
    562     if( rtsp->p_private->path ) free( rtsp->p_private->path ); 
    563     if( rtsp->p_private->host ) free( rtsp->p_private->host ); 
    564     if( rtsp->p_private->mrl ) free( rtsp->p_private->mrl ); 
    565     if( rtsp->p_private->session ) free( rtsp->p_private->session ); 
    566     if( rtsp->p_private->user_agent ) free( rtsp->p_private->user_agent ); 
    567     if( rtsp->p_private->server ) free( rtsp->p_private->server ); 
     562    free( rtsp->p_private->path ); 
     563    free( rtsp->p_private->host ); 
     564    free( rtsp->p_private->mrl ); 
     565    free( rtsp->p_private->session ); 
     566    free( rtsp->p_private->user_agent ); 
     567    free( rtsp->p_private->server ); 
    568568    rtsp_free_answers( rtsp ); 
    569569    rtsp_unschedule_all( rtsp ); 
     
    605605void rtsp_set_session( rtsp_client_t *rtsp, const char *id ) 
    606606{ 
    607     if( rtsp->p_private->session ) free( rtsp->p_private->session ); 
     607    free( rtsp->p_private->session ); 
    608608    rtsp->p_private->session = strdup(id); 
    609609} 
     
    648648      if( !strncmp(*ptr, string, strlen(string)) ) break; 
    649649    } 
    650     if( *ptr ) free( *ptr ); 
     650    free( *ptr ); 
    651651    ptr++; 
    652652    do 
  • modules/access/smb.c

    r99fab90 r9630c00  
    189189 
    190190    if( !psz_user ) psz_user = var_CreateGetString( p_access, "smb-user" ); 
    191     if( psz_user && !*psz_user ) { free( psz_user ); psz_user = 0; } 
     191    if( !*psz_user ) { free( psz_user ); psz_user = 0; } 
    192192    if( !psz_pwd ) psz_pwd = var_CreateGetString( p_access, "smb-pwd" ); 
    193     if( psz_pwd && !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; } 
     193    if( !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; } 
    194194    if(!psz_domain) psz_domain = var_CreateGetString( p_access, "smb-domain" ); 
    195     if( psz_domain && !*psz_domain ) { free( psz_domain ); psz_domain = 0; } 
     195    if( !*psz_domain ) { free( psz_domain ); psz_domain = 0; } 
    196196 
    197197#ifdef WIN32 
     
    209209#endif 
    210210 
    211     if( psz_user ) free( psz_user ); 
    212     if( psz_pwd ) free( psz_pwd ); 
    213     if( psz_domain ) free( psz_domain ); 
     211    free( psz_user ); 
     212    free( psz_pwd ); 
     213    free( psz_domain ); 
    214214 
    215215#ifdef USE_CTX 
  • modules/access/v4l.c

    r99fab90 r9630c00  
    432432            if( p_sys->fd_audio >= 0 ) 
    433433            { 
    434                 if( p_sys->psz_adev ) free( p_sys->psz_adev ); 
     434                free( p_sys->psz_adev ); 
    435435                p_sys->psz_adev = p_sys->psz_device; 
    436436                p_sys->psz_device = NULL; 
     
    439439        else 
    440440        { 
    441             if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); 
     441            free( p_sys->psz_vdev ); 
    442442            p_sys->psz_vdev = p_sys->psz_device; 
    443443            p_sys->psz_device = NULL; 
     
    460460        if( !p_sys->psz_vdev || !*p_sys->psz_vdev ) 
    461461        { 
    462             if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); 
     462            free( p_sys->psz_vdev ); 
    463463            p_sys->psz_vdev = var_CreateGetString( p_demux, "v4l-vdev" );; 
    464464        } 
     
    475475        if( !p_sys->psz_adev || !*p_sys->psz_adev ) 
    476476        { 
    477             if( p_sys->psz_adev ) free( p_sys->psz_adev ); 
     477            free( p_sys->psz_adev ); 
    478478            p_sys->psz_adev = var_CreateGetString( p_demux, "v4l-adev" );; 
    479479        } 
     
    549549    demux_sys_t *p_sys   = p_demux->p_sys; 
    550550 
    551     if( p_sys->psz_device ) free( p_sys->psz_device ); 
    552     if( p_sys->psz_vdev )   free( p_sys->psz_vdev ); 
    553     if( p_sys->psz_adev )   free( p_sys->psz_adev ); 
     551    free( p_sys->psz_device ); 
     552    free( p_sys->psz_vdev ); 
     553    free( p_sys->psz_adev ); 
    554554    if( p_sys->fd_video >= 0 ) close( p_sys->fd_video ); 
    555555    if( p_sys->fd_audio >= 0 ) close( p_sys->fd_audio ); 
     
    867867        p_sys->psz_device = strdup( psz_dup ); 
    868868    } 
    869     if( psz_dup ) free( psz_dup ); 
     869    free( psz_dup ); 
    870870} 
    871871 
  • modules/access/v4l2/v4l2.c

    r4ab0073 r9630c00  
    611611                msg_Dbg( p_this, "'%s' is a video device", p_sys->psz_device ); 
    612612                /* Device was a video device */ 
    613                 if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); 
     613                free( p_sys->psz_vdev ); 
    614614                p_sys->psz_vdev = p_sys->psz_device; 
    615615                p_sys->psz_device = NULL; 
     
    654654        if( !p_sys->psz_vdev || !*p_sys->psz_vdev ) 
    655655        { 
    656             if( p_sys->psz_vdev ) free( p_sys->psz_vdev ); 
     656            free( p_sys->psz_vdev ); 
    657657            p_sys->psz_vdev = var_CreateGetString( p_this, "v4l2-dev" ); 
    658658        } 
     
    863863                } 
    864864 
    865                 if( p_sys->psz_requested_chroma ) free( p_sys->psz_requested_chroma ); 
     865                free( p_sys->psz_requested_chroma ); 
    866866                p_sys->psz_requested_chroma = strndup( psz_parser, i_len ); 
    867867 
     
    10541054        p_sys->psz_device = strdup( psz_dup ); 
    10551055    } 
    1056     if( psz_dup ) free( psz_dup ); 
     1056    free( psz_dup ); 
    10571057} 
    10581058 
  • modules/access/vcd/cdrom.c

    r99fab90 r9630c00  
    163163void ioctl_Close( vlc_object_t * p_this, vcddev_t *p_vcddev ) 
    164164{ 
    165     if( p_vcddev->psz_dev ) free( p_vcddev->psz_dev ); 
     165    free( p_vcddev->psz_dev ); 
    166166 
    167167    if( p_vcddev->i_vcdimage_handle != -1 ) 
     
    359359                if( *pp_sectors == NULL || p_fulltoc == NULL ) 
    360360                { 
    361                     if( *pp_sectors ) free( *pp_sectors ); 
    362                     if( p_fulltoc ) free( p_fulltoc ); 
     361                    free( *pp_sectors ); 
     362                    free( p_fulltoc ); 
    363363                    msg_Err( p_this, "out of memory" ); 
    364364                    CloseHandle( hEvent ); 
     
    973973error: 
    974974    if( cuefile ) fclose( cuefile ); 
    975     if( psz_cuefile ) free( psz_cuefile ); 
    976     if( psz_vcdfile ) free( psz_vcdfile ); 
     975    free( psz_cuefile ); 
     976    free( psz_vcdfile ); 
    977977 
    978978    return i_ret; 
     
    989989        return; 
    990990 
    991     if( p_vcddev->p_sectors ) 
    992         free( p_vcddev->p_sectors ); 
     991    free( p_vcddev->p_sectors ); 
    993992} 
    994993 
  • modules/audio_filter/normvol.c

    r99fab90 r9630c00  
    244244    if( p_sys ) 
    245245    { 
    246         if( p_sys->p_last) free( p_sys->p_last ); 
     246        free( p_sys->p_last ); 
    247247        free( p_sys ); 
    248248    }