Changeset 0f00164eb903cee76c89575ed26117332ed1ee99
- 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
| r1b63715 |
r0f00164 |
|
| 139 | 139 | #if defined(_ATMO_VLC_PLUGIN_) |
|---|
| 140 | 140 | 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; } |
|---|
| 142 | 142 | #else |
|---|
| 143 | 143 | int getComport() { return m_Comport; } |
|---|
| r733a686 |
r0f00164 |
|
| 265 | 265 | p_vout->p_sys->i_clones ); |
|---|
| 266 | 266 | p_vout->p_sys->i_clones = i_vout; |
|---|
| 267 | | if( psz_default_vout ) free( psz_default_vout ); |
|---|
| | 267 | free( psz_default_vout ); |
|---|
| 268 | 268 | RemoveAllVout( p_vout ); |
|---|
| 269 | 269 | return VLC_EGENERIC; |
|---|
| … | … | |
| 273 | 273 | } |
|---|
| 274 | 274 | |
|---|
| 275 | | if( psz_default_vout ) free( psz_default_vout ); |
|---|
| | 275 | free( psz_default_vout ); |
|---|
| 276 | 276 | ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES ); |
|---|
| 277 | 277 | |
|---|
| r733a686 |
r0f00164 |
|
| 737 | 737 | } |
|---|
| 738 | 738 | |
|---|
| 739 | | if( p_hough ) free( p_hough ); |
|---|
| 740 | | if( p_smooth ) free( p_smooth ); |
|---|
| | 739 | free( p_hough ); |
|---|
| | 740 | free( p_smooth ); |
|---|
| 741 | 741 | } |
|---|
| 742 | 742 | #undef p_pre_hough |
|---|
| r6076147 |
r0f00164 |
|
| 239 | 239 | filter_sys_t *p_sys = p_filter->p_sys; |
|---|
| 240 | 240 | |
|---|
| 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 ); |
|---|
| 243 | 243 | |
|---|
| 244 | 244 | /* Delete the marquee variables */ |
|---|
| … | … | |
| 342 | 342 | if( !strncmp( psz_var, "marq-marquee", 7 ) ) |
|---|
| 343 | 343 | { |
|---|
| 344 | | if( p_sys->psz_marquee ) free( p_sys->psz_marquee ); |
|---|
| | 344 | free( p_sys->psz_marquee ); |
|---|
| 345 | 345 | p_sys->psz_marquee = strdup( newval.psz_string ); |
|---|
| 346 | 346 | } |
|---|
| r733a686 |
r0f00164 |
|
| 282 | 282 | osd_MenuDelete( p_this, p_sys->p_menu ); |
|---|
| 283 | 283 | 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 ); |
|---|
| 286 | 286 | return VLC_EGENERIC; |
|---|
| 287 | 287 | } |
|---|
| … | … | |
| 329 | 329 | osd_MenuDelete( p_filter, p_sys->p_menu ); |
|---|
| 330 | 330 | |
|---|
| 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 ); |
|---|
| 333 | 333 | } |
|---|
| 334 | 334 | |
|---|
| r17e3907 |
r0f00164 |
|
| 349 | 349 | vlc_mutex_lock( &p_sys->lock ); |
|---|
| 350 | 350 | |
|---|
| 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 ); |
|---|
| 353 | 353 | free( p_sys->psz_urls ); |
|---|
| 354 | 354 | FreeRSS( p_filter ); |
|---|
| … | … | |
| 741 | 741 | |
|---|
| 742 | 742 | 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; |
|---|
| 748 | 745 | psz_eltname = xml_ReaderName( p_xml_reader ); |
|---|
| 749 | 746 | if( !psz_eltname ) |
|---|
| … | … | |
| 817 | 814 | else |
|---|
| 818 | 815 | { |
|---|
| 819 | | if( psz_href ) free( psz_href ); |
|---|
| 820 | | } |
|---|
| 821 | | if( psz_rel ) free( psz_rel ); |
|---|
| | 816 | free( psz_href ); |
|---|
| | 817 | } |
|---|
| | 818 | free( psz_rel ); |
|---|
| 822 | 819 | } |
|---|
| 823 | 820 | break; |
|---|
| 824 | 821 | |
|---|
| 825 | 822 | 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; |
|---|
| 831 | 825 | psz_eltname = xml_ReaderName( p_xml_reader ); |
|---|
| 832 | 826 | if( !psz_eltname ) |
|---|
| r99fab90 |
r0f00164 |
|
| 256 | 256 | vout_sys_t *p_sys = p_vout->p_sys; |
|---|
| 257 | 257 | |
|---|
| 258 | | if( p_sys->p_pixels ) |
|---|
| 259 | | free( p_sys->p_pixels ); |
|---|
| | 258 | free( p_sys->p_pixels ); |
|---|
| 260 | 259 | } |
|---|
| 261 | 260 | |
|---|
| … | … | |
| 266 | 265 | |
|---|
| 267 | 266 | CloseDisplay( p_vout ); |
|---|
| 268 | | if( p_sys ) free( p_sys ); |
|---|
| | 267 | free( p_sys ); |
|---|
| 269 | 268 | p_sys = NULL; |
|---|
| 270 | 269 | } |
|---|
| r99fab90 |
r0f00164 |
|
| 396 | 396 | |
|---|
| 397 | 397 | p_vout->p_sys->p_display = ggiOpen( psz_display, NULL ); |
|---|
| 398 | | if( psz_display ) free( psz_display ); |
|---|
| | 398 | free( psz_display ); |
|---|
| 399 | 399 | |
|---|
| 400 | 400 | if( p_vout->p_sys->p_display == NULL ) |
|---|
| ra78e273 |
r0f00164 |
|
| 528 | 528 | } |
|---|
| 529 | 529 | |
|---|
| 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; |
|---|
| 535 | 532 | } |
|---|
| 536 | 533 | |
|---|
| … | … | |
| 838 | 835 | hmon == p_vout->p_sys->hmonitor ) |
|---|
| 839 | 836 | { |
|---|
| 840 | | if( device.psz_string ) free( device.psz_string ); |
|---|
| | 837 | free( device.psz_string ); |
|---|
| 841 | 838 | } |
|---|
| 842 | 839 | else if( strcmp( psz_drivername, device.psz_string ) == 0 ) |
|---|
| … | … | |
| 864 | 861 | |
|---|
| 865 | 862 | p_vout->p_sys->hmonitor = hmon; |
|---|
| 866 | | if( device.psz_string ) free( device.psz_string ); |
|---|
| | 863 | free( device.psz_string ); |
|---|
| 867 | 864 | } |
|---|
| 868 | 865 | else |
|---|
| 869 | 866 | { |
|---|
| 870 | | if( device.psz_string ) free( device.psz_string ); |
|---|
| | 867 | free( device.psz_string ); |
|---|
| 871 | 868 | return TRUE; /* Keep enumerating */ |
|---|
| 872 | 869 | } |
|---|
| … | … | |
| 1329 | 1326 | } |
|---|
| 1330 | 1327 | |
|---|
| 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; |
|---|
| 1336 | 1330 | |
|---|
| 1337 | 1331 | p_vout->p_sys->hmonitor = NULL; |
|---|
| r99fab90 |
r0f00164 |
|
| 317 | 317 | if( !val.psz_string || !*val.psz_string ) /* Default video title */ |
|---|
| 318 | 318 | { |
|---|
| 319 | | if( val.psz_string ) free( val.psz_string ); |
|---|
| | 319 | free( val.psz_string ); |
|---|
| 320 | 320 | |
|---|
| 321 | 321 | #ifdef MODULE_NAME_IS_wingdi |
|---|
| ra78e273 |
r0f00164 |
|
| 496 | 496 | #endif |
|---|
| 497 | 497 | } |
|---|
| 498 | | if( val.psz_string ) free( val.psz_string ); |
|---|
| | 498 | free( val.psz_string ); |
|---|
| 499 | 499 | |
|---|
| 500 | 500 | if( p_sys->i_effect & ( OPENGL_EFFECT_CUBE | |
|---|
| … | … | |
| 554 | 554 | /* Free the texture buffer*/ |
|---|
| 555 | 555 | 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] ); |
|---|
| 558 | 558 | |
|---|
| 559 | 559 | if( p_sys->p_vout->pf_unlock ) |
|---|
| r9a8650a |
r0f00164 |
|
| 225 | 225 | XDisplayName( psz_display ) ); |
|---|
| 226 | 226 | free( p_vout->p_sys ); |
|---|
| 227 | | if( psz_display ) free( psz_display ); |
|---|
| | 227 | free( psz_display ); |
|---|
| 228 | 228 | return VLC_EGENERIC; |
|---|
| 229 | 229 | } |
|---|
| 230 | | if( psz_display ) free( psz_display ); |
|---|
| | 230 | free( psz_display ); |
|---|
| 231 | 231 | |
|---|
| 232 | 232 | /* Replace error handler so we can intercept some non-fatal errors */ |
|---|
| … | … | |
| 1699 | 1699 | p_win->base_window, val.psz_string ); |
|---|
| 1700 | 1700 | } |
|---|
| 1701 | | if( val.psz_string ) free( val.psz_string ); |
|---|
| | 1701 | free( val.psz_string ); |
|---|
| 1702 | 1702 | |
|---|
| 1703 | 1703 | if( !p_vout->b_fullscreen ) |
|---|