Changeset 0f00164eb903cee76c89575ed26117332ed1ee99

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:

[1e83ef8280d68b3314e2c8bc3d918aba3c897b8f]

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

Remove useless test before a free().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/video_filter/atmo/AtmoConfig.h

    r1b63715 r0f00164  
    139139#if defined(_ATMO_VLC_PLUGIN_) 
    140140        char *getSerialDevice()               { return m_devicename; } 
    141         void setSerialDevice(char *newdevice) { if(m_devicename) free(m_devicename); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; } 
     141        void setSerialDevice(char *newdevice) { free( m_devicename ); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; } 
    142142#else 
    143143        int getComport()                    { return m_Comport; } 
  • modules/video_filter/clone.c

    r733a686 r0f00164  
    265265                     p_vout->p_sys->i_clones ); 
    266266            p_vout->p_sys->i_clones = i_vout; 
    267             if( psz_default_vout ) free( psz_default_vout ); 
     267            free( psz_default_vout ); 
    268268            RemoveAllVout( p_vout ); 
    269269            return VLC_EGENERIC; 
     
    273273    } 
    274274 
    275     if( psz_default_vout ) free( psz_default_vout ); 
     275    free( psz_default_vout ); 
    276276    ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES ); 
    277277 
  • modules/video_filter/gradient.c

    r733a686 r0f00164  
    737737    } 
    738738 
    739     if( p_hough ) free( p_hough ); 
    740     if( p_smooth ) free( p_smooth ); 
     739    free( p_hough ); 
     740    free( p_smooth ); 
    741741} 
    742742#undef p_pre_hough 
  • modules/video_filter/marq.c

    r6076147 r0f00164  
    239239    filter_sys_t *p_sys = p_filter->p_sys; 
    240240 
    241     if( p_sys->p_style ) free( p_sys->p_style ); 
    242     if( p_sys->psz_marquee ) free( p_sys->psz_marquee ); 
     241    free( p_sys->p_style ); 
     242    free( p_sys->psz_marquee ); 
    243243 
    244244    /* Delete the marquee variables */ 
     
    342342    if( !strncmp( psz_var, "marq-marquee", 7 ) ) 
    343343    { 
    344         if( p_sys->psz_marquee ) free( p_sys->psz_marquee ); 
     344        free( p_sys->psz_marquee ); 
    345345        p_sys->psz_marquee = strdup( newval.psz_string ); 
    346346    } 
  • modules/video_filter/osdmenu.c

    r733a686 r0f00164  
    282282    osd_MenuDelete( p_this, p_sys->p_menu ); 
    283283    p_sys->p_menu = NULL; 
    284     if( p_sys->psz_file ) free( p_sys->psz_file ); 
    285     if( p_sys ) free( p_sys ); 
     284    free( p_sys->psz_file ); 
     285    free( p_sys ); 
    286286    return VLC_EGENERIC; 
    287287} 
     
    329329    osd_MenuDelete( p_filter, p_sys->p_menu ); 
    330330 
    331     if( p_sys->psz_file ) free( p_sys->psz_file ); 
    332     if( p_sys ) free( p_sys ); 
     331    free( p_sys->psz_file ); 
     332    free( p_sys ); 
    333333} 
    334334 
  • modules/video_filter/rss.c

    r17e3907 r0f00164  
    349349    vlc_mutex_lock( &p_sys->lock ); 
    350350 
    351     if( p_sys->p_style ) free( p_sys->p_style ); 
    352     if( p_sys->psz_marquee ) free( p_sys->psz_marquee ); 
     351    free( p_sys->p_style ); 
     352    free( p_sys->psz_marquee ); 
    353353    free( p_sys->psz_urls ); 
    354354    FreeRSS( p_filter ); 
     
    741741 
    742742                case XML_READER_STARTELEM: 
    743                     if( psz_eltname ) 
    744                     { 
    745                         free( psz_eltname ); 
    746                         psz_eltname = NULL; 
    747                     } 
     743                    free( psz_eltname ); 
     744                    psz_eltname = NULL; 
    748745                    psz_eltname = xml_ReaderName( p_xml_reader ); 
    749746                    if( !psz_eltname ) 
     
    817814                        else 
    818815                        { 
    819                             if( psz_href ) free( psz_href ); 
    820                         } 
    821                         if( psz_rel ) free( psz_rel ); 
     816                            free( psz_href ); 
     817                        } 
     818                        free( psz_rel ); 
    822819                    } 
    823820                    break; 
    824821 
    825822                case XML_READER_ENDELEM: 
    826                     if( psz_eltname ) 
    827                     { 
    828                         free( psz_eltname ); 
    829                         psz_eltname = NULL; 
    830                     } 
     823                    free( psz_eltname ); 
     824                    psz_eltname = NULL; 
    831825                    psz_eltname = xml_ReaderName( p_xml_reader ); 
    832826                    if( !psz_eltname ) 
  • modules/video_output/directfb.c

    r99fab90 r0f00164  
    256256    vout_sys_t *p_sys = p_vout->p_sys; 
    257257 
    258     if( p_sys->p_pixels ) 
    259         free( p_sys->p_pixels ); 
     258    free( p_sys->p_pixels ); 
    260259} 
    261260 
     
    266265 
    267266    CloseDisplay( p_vout ); 
    268     if( p_sys ) free( p_sys ); 
     267    free( p_sys ); 
    269268    p_sys = NULL; 
    270269} 
  • modules/video_output/ggi.c

    r99fab90 r0f00164  
    396396 
    397397    p_vout->p_sys->p_display = ggiOpen( psz_display, NULL ); 
    398     if( psz_display ) free( psz_display ); 
     398    free( psz_display ); 
    399399 
    400400    if( p_vout->p_sys->p_display == NULL ) 
  • modules/video_output/msw/directx.c

    ra78e273 r0f00164  
    528528    } 
    529529 
    530     if( p_vout->p_sys ) 
    531     { 
    532         free( p_vout->p_sys ); 
    533         p_vout->p_sys = NULL; 
    534     } 
     530    free( p_vout->p_sys ); 
     531    p_vout->p_sys = NULL; 
    535532} 
    536533 
     
    838835            hmon == p_vout->p_sys->hmonitor ) 
    839836        { 
    840             if( device.psz_string ) free( device.psz_string ); 
     837            free( device.psz_string ); 
    841838        } 
    842839        else if( strcmp( psz_drivername, device.psz_string ) == 0 ) 
     
    864861 
    865862            p_vout->p_sys->hmonitor = hmon; 
    866             if( device.psz_string ) free( device.psz_string ); 
     863            free( device.psz_string ); 
    867864        } 
    868865        else 
    869866        { 
    870             if( device.psz_string ) free( device.psz_string ); 
     867            free( device.psz_string ); 
    871868            return TRUE; /* Keep enumerating */ 
    872869        } 
     
    13291326    } 
    13301327 
    1331     if( p_vout->p_sys->p_display_driver != NULL ) 
    1332     { 
    1333         free( p_vout->p_sys->p_display_driver ); 
    1334         p_vout->p_sys->p_display_driver = NULL; 
    1335     } 
     1328    free( p_vout->p_sys->p_display_driver ); 
     1329    p_vout->p_sys->p_display_driver = NULL; 
    13361330 
    13371331    p_vout->p_sys->hmonitor = NULL; 
  • modules/video_output/msw/events.c

    r99fab90 r0f00164  
    317317            if( !val.psz_string || !*val.psz_string ) /* Default video title */ 
    318318            { 
    319                 if( val.psz_string ) free( val.psz_string ); 
     319                free( val.psz_string ); 
    320320 
    321321#ifdef MODULE_NAME_IS_wingdi 
  • modules/video_output/opengl.c

    ra78e273 r0f00164  
    496496#endif 
    497497    } 
    498     if( val.psz_string ) free( val.psz_string ); 
     498    free( val.psz_string ); 
    499499 
    500500    if( p_sys->i_effect & ( OPENGL_EFFECT_CUBE | 
     
    554554    /* Free the texture buffer*/ 
    555555    glDeleteTextures( 2, p_sys->p_textures ); 
    556     if( p_sys->pp_buffer[0] ) free( p_sys->pp_buffer[0] ); 
    557     if( p_sys->pp_buffer[1] ) free( p_sys->pp_buffer[1] ); 
     556    free( p_sys->pp_buffer[0] ); 
     557    free( p_sys->pp_buffer[1] ); 
    558558 
    559559    if( p_sys->p_vout->pf_unlock ) 
  • modules/video_output/x11/xcommon.c

    r9a8650a r0f00164  
    225225                         XDisplayName( psz_display ) ); 
    226226        free( p_vout->p_sys ); 
    227         if( psz_display ) free( psz_display ); 
     227        free( psz_display ); 
    228228        return VLC_EGENERIC; 
    229229    } 
    230     if( psz_display ) free( psz_display ); 
     230    free( psz_display ); 
    231231 
    232232    /* Replace error handler so we can intercept some non-fatal errors */ 
     
    16991699                        p_win->base_window, val.psz_string ); 
    17001700        } 
    1701         if( val.psz_string ) free( val.psz_string ); 
     1701        free( val.psz_string ); 
    17021702 
    17031703        if( !p_vout->b_fullscreen )