Changeset 6411526fe052a033300e73045b07c0aaee089e88
- 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
| rb4c3135 |
r6411526 |
|
| 202 | 202 | } |
|---|
| 203 | 203 | } |
|---|
| 204 | | if( psz_src != NULL ) |
|---|
| 205 | | free( psz_src ); |
|---|
| | 204 | free( psz_src ); |
|---|
| 206 | 205 | #endif |
|---|
| 207 | 206 | |
|---|
| … | … | |
| 276 | 275 | unsigned i; |
|---|
| 277 | 276 | |
|---|
| 278 | | if( psz_src != NULL ) |
|---|
| 279 | | { |
|---|
| 280 | | free( psz_src ); |
|---|
| 281 | | psz_src = NULL; |
|---|
| 282 | | } |
|---|
| | 277 | free( psz_src ); |
|---|
| | 278 | psz_src = NULL; |
|---|
| 283 | 279 | |
|---|
| 284 | 280 | for( i = 0; ppsz_paths[i] != NULL; i++ ) |
|---|
| … | … | |
| 373 | 369 | free( p_sys->pp_files[i] ); |
|---|
| 374 | 370 | } |
|---|
| 375 | | if( p_sys->pp_files ) |
|---|
| 376 | | { |
|---|
| 377 | | free( p_sys->pp_files ); |
|---|
| 378 | | } |
|---|
| | 371 | free( p_sys->pp_files ); |
|---|
| 379 | 372 | for( i = 0; i < p_sys->i_handlers; i++ ) |
|---|
| 380 | 373 | { |
|---|
| … | … | |
| 795 | 788 | TAB_REMOVE( p_args->p_association->i_argc, p_args->p_association->ppsz_argv, |
|---|
| 796 | 789 | psz_file ); |
|---|
| 797 | | if( psz_cwd != NULL ) |
|---|
| 798 | | free( psz_cwd ); |
|---|
| | 790 | free( psz_cwd ); |
|---|
| 799 | 791 | while( i_env ) |
|---|
| 800 | 792 | TAB_REMOVE( i_env, ppsz_env, ppsz_env[0] ); |
|---|
| r99fab90 |
r6411526 |
|
| 329 | 329 | } |
|---|
| 330 | 330 | |
|---|
| 331 | | if( user ) |
|---|
| 332 | | { |
|---|
| 333 | | free( user ); |
|---|
| 334 | | } |
|---|
| 335 | | if( password ) |
|---|
| 336 | | { |
|---|
| 337 | | free( password ); |
|---|
| 338 | | } |
|---|
| | 331 | free( user ); |
|---|
| | 332 | free( password ); |
|---|
| 339 | 333 | |
|---|
| 340 | 334 | ACL_Destroy( p_acl ); |
|---|
| r99fab90 |
r6411526 |
|
| 124 | 124 | |
|---|
| 125 | 125 | /* 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 ); |
|---|
| 128 | 127 | lirc_freeconfig( p_intf->p_sys->config ); |
|---|
| 129 | 128 | lirc_deinit(); |
|---|
| r99fab90 |
r6411526 |
|
| 197 | 197 | strcat( psz_path, psz_extra ); |
|---|
| 198 | 198 | } |
|---|
| 199 | | if( psz_extra ) free( psz_extra ); |
|---|
| | 199 | free( psz_extra ); |
|---|
| 200 | 200 | |
|---|
| 201 | 201 | psz_extra = config_GetPsz( p_intf, "ntservice-options" ); |
|---|
| … | … | |
| 205 | 205 | strcat( psz_path, psz_extra ); |
|---|
| 206 | 206 | } |
|---|
| 207 | | if( psz_extra ) free( psz_extra ); |
|---|
| | 207 | free( psz_extra ); |
|---|
| 208 | 208 | |
|---|
| 209 | 209 | SC_HANDLE service = |
|---|
| … | … | |
| 339 | 339 | } |
|---|
| 340 | 340 | } |
|---|
| 341 | | if( psz_modules ) |
|---|
| 342 | | { |
|---|
| 343 | | free( psz_modules ); |
|---|
| 344 | | } |
|---|
| | 341 | free( psz_modules ); |
|---|
| 345 | 342 | |
|---|
| 346 | 343 | /* Initialization complete - report running status */ |
|---|
| ra78e273 |
r6411526 |
|
| 151 | 151 | if( !p_sys->p_packetizer->p_module ) |
|---|
| 152 | 152 | { |
|---|
| 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 ); |
|---|
| 155 | 154 | vlc_object_release( p_sys->p_packetizer ); |
|---|
| 156 | 155 | |
|---|
| … | … | |
| 190 | 189 | module_Unneed( p_sys->p_packetizer, p_sys->p_packetizer->p_module ); |
|---|
| 191 | 190 | |
|---|
| 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 ); |
|---|
| 194 | 192 | |
|---|
| 195 | 193 | /* Delete the decoder */ |
|---|
| … | … | |
| 713 | 711 | } |
|---|
| 714 | 712 | error: |
|---|
| 715 | | if( psz_mime ) |
|---|
| 716 | | free( psz_mime ); |
|---|
| 717 | | if( psz_description ) |
|---|
| 718 | | free( psz_description ); |
|---|
| | 713 | free( psz_mime ); |
|---|
| | 714 | free( psz_description ); |
|---|
| 719 | 715 | } |
|---|
| 720 | 716 | #undef RM |
|---|
| r99fab90 |
r6411526 |
|
| 512 | 512 | demux_sys_t *p_sys = p_demux->p_sys; |
|---|
| 513 | 513 | |
|---|
| 514 | | if( p_sys->psz_separator ) |
|---|
| 515 | | { |
|---|
| 516 | | free( p_sys->psz_separator ); |
|---|
| 517 | | } |
|---|
| | 514 | free( p_sys->psz_separator ); |
|---|
| 518 | 515 | free( p_sys ); |
|---|
| 519 | 516 | } |
|---|
| r8632e67 |
r6411526 |
|
| 1209 | 1209 | if( p_box->i_type == FOURCC_alac ) |
|---|
| 1210 | 1210 | { |
|---|
| 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 ); |
|---|
| 1213 | 1212 | |
|---|
| 1214 | 1213 | p_box->data.p_sample_soun->p_qt_description = malloc( i_read ); |
|---|
| r99fab90 |
r6411526 |
|
| 317 | 317 | demux_sys_t *p_sys = p_demux->p_sys; |
|---|
| 318 | 318 | |
|---|
| 319 | | if( p_sys->p_extra_f ) |
|---|
| 320 | | free( p_sys->p_extra_f ); |
|---|
| | 319 | free( p_sys->p_extra_f ); |
|---|
| 321 | 320 | demux_IndexClean( &p_sys->idx ); |
|---|
| 322 | 321 | free( p_sys ); |
|---|
| … | … | |
| 645 | 644 | static void demux_IndexClean( demux_index_t *p_idx ) |
|---|
| 646 | 645 | { |
|---|
| 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; |
|---|
| 652 | 648 | } |
|---|
| 653 | 649 | static void demux_IndexAppend( demux_index_t *p_idx, |
|---|
| rdbddc5a |
r6411526 |
|
| 27 | 27 | |
|---|
| 28 | 28 | /* 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; |
|---|
| 33 | 33 | #define FREE_ATT() FREE_NAME();FREE_VALUE() |
|---|
| 34 | 34 | #define FREE_ATT_KEY() FREE_NAME();FREE_VALUE();FREE_KEY() |
|---|
| r656fa1a |
r6411526 |
|
| 74 | 74 | { |
|---|
| 75 | 75 | 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 ); |
|---|
| 80 | 77 | free( p_demux->p_sys ); |
|---|
| 81 | 78 | } |
|---|
| … | … | |
| 173 | 170 | msg_Warn( p_demux, "no file= part found for item %d", i_item ); |
|---|
| 174 | 171 | } |
|---|
| 175 | | if( psz_name ) |
|---|
| 176 | | { |
|---|
| 177 | | free( psz_name ); |
|---|
| 178 | | psz_name = NULL; |
|---|
| 179 | | } |
|---|
| | 172 | free( psz_name ); |
|---|
| | 173 | psz_name = NULL; |
|---|
| 180 | 174 | i_duration = -1; |
|---|
| 181 | 175 | i_item = i_new_item; |
|---|
| … | … | |
| 185 | 179 | !strncasecmp( psz_key, "Ref", sizeof("Ref") -1 ) ) |
|---|
| 186 | 180 | { |
|---|
| 187 | | if( psz_mrl_orig ) |
|---|
| 188 | | free( psz_mrl_orig ); |
|---|
| | 181 | free( psz_mrl_orig ); |
|---|
| 189 | 182 | psz_mrl_orig = |
|---|
| 190 | 183 | psz_mrl = E_(ProcessMRL)( psz_value, p_demux->p_sys->psz_prefix ); |
|---|
| … | … | |
| 203 | 196 | else if( !strncasecmp( psz_key, "title", sizeof("title") -1 ) ) |
|---|
| 204 | 197 | { |
|---|
| 205 | | if( psz_name ) |
|---|
| 206 | | free( psz_name ); |
|---|
| | 198 | free( psz_name ); |
|---|
| 207 | 199 | psz_name = strdup( psz_value ); |
|---|
| 208 | 200 | } |
|---|
| … | … | |
| 235 | 227 | msg_Warn( p_demux, "no file= part found for item %d", i_item ); |
|---|
| 236 | 228 | } |
|---|
| 237 | | if( psz_name ) |
|---|
| 238 | | { |
|---|
| 239 | | free( psz_name ); |
|---|
| 240 | | psz_name = NULL; |
|---|
| 241 | | } |
|---|
| | 229 | free( psz_name ); |
|---|
| | 230 | psz_name = NULL; |
|---|
| 242 | 231 | |
|---|
| 243 | 232 | HANDLE_PLAY_AND_RELEASE; |
|---|
| r53783dc |
r6411526 |
|
| 311 | 311 | |
|---|
| 312 | 312 | 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 ); |
|---|
| 319 | 315 | |
|---|
| 320 | 316 | free( p_sys ); |
|---|
| reebf82e |
r6411526 |
|
| 2400 | 2400 | else |
|---|
| 2401 | 2401 | { |
|---|
| 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; |
|---|
| 2408 | 2405 | } |
|---|
| 2409 | 2406 | } |
|---|
| r99fab90 |
r6411526 |
|
| 546 | 546 | cc_Exit( &p_sys->cc ); |
|---|
| 547 | 547 | free( p_sys->rec_hdrs ); |
|---|
| 548 | | if( p_sys->seq_table ) |
|---|
| 549 | | free( p_sys->seq_table ); |
|---|
| | 548 | free( p_sys->seq_table ); |
|---|
| 550 | 549 | free(p_sys); |
|---|
| 551 | 550 | } |
|---|
| … | … | |
| 1128 | 1127 | { |
|---|
| 1129 | 1128 | /* */ |
|---|
| 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 ); |
|---|
| 1136 | 1132 | |
|---|
| 1137 | 1133 | /* */ |
|---|
| 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 ); |
|---|
| 1142 | 1136 | /* */ |
|---|
| 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 ); |
|---|
| 1147 | 1139 | } |
|---|
| 1148 | 1140 | static void XdsStringUtf8( char dst[2*32+1], const uint8_t *p_src, int i_src ) |
|---|
| … | … | |
| 1180 | 1172 | return VLC_FALSE; |
|---|
| 1181 | 1173 | |
|---|
| 1182 | | if( *ppsz_dst ) |
|---|
| 1183 | | free( *ppsz_dst ); |
|---|
| | 1174 | free( *ppsz_dst ); |
|---|
| 1184 | 1175 | if( psz_new ) |
|---|
| 1185 | 1176 | *ppsz_dst = strdup( psz_new ); |
|---|
| … | … | |
| 1642 | 1633 | |
|---|
| 1643 | 1634 | /* clear the SEQ table */ |
|---|
| 1644 | | if (p_sys->seq_table != NULL) |
|---|
| 1645 | | free(p_sys->seq_table); |
|---|
| | 1635 | free(p_sys->seq_table); |
|---|
| 1646 | 1636 | |
|---|
| 1647 | 1637 | /* parse header info */ |
|---|
| … | … | |
| 1901 | 1891 | /*msg_Dbg( p_demux, "chunk has %d records", i_num_recs );*/ |
|---|
| 1902 | 1892 | |
|---|
| 1903 | | if (p_sys->rec_hdrs) |
|---|
| 1904 | | free(p_sys->rec_hdrs); |
|---|
| | 1893 | free(p_sys->rec_hdrs); |
|---|
| 1905 | 1894 | |
|---|
| 1906 | 1895 | /* skip past the 4 bytes we "peeked" earlier */ |
|---|