Changeset 172e22c2f2b4abbdfee50d9fe8aaaede4b405c76
- Timestamp:
- 06/22/08 21:41:15
(3 months ago)
- Author:
- Rémi Duraffort <ivoire@videolan.org>
- git-committer:
- Rémi Duraffort <ivoire@videolan.org> 1214163675 +0200
- git-parent:
[42bb236284b09355d8bfde47fb4915dd1f07aa68]
- git-author:
- Rémi Duraffort <ivoire@videolan.org> 1214071945 +0200
- Message:
Remove unneeded msg_Error.
Fix a potential segfault.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| raa13881 |
r172e22c |
|
| 217 | 217 | if( !(p_smb = smbc_new_context()) ) |
|---|
| 218 | 218 | { |
|---|
| 219 | | msg_Err( p_access, "out of memory" ); |
|---|
| 220 | 219 | free( psz_uri ); |
|---|
| 221 | 220 | return VLC_ENOMEM; |
|---|
| r3561b9b |
r172e22c |
|
| 202 | 202 | p_sys = (bonjour_t *)malloc( sizeof(*p_sys) ); |
|---|
| 203 | 203 | if( p_sys == NULL ) |
|---|
| 204 | | { |
|---|
| 205 | | msg_Err( p_log, "out of memory" ); |
|---|
| 206 | 204 | return NULL; |
|---|
| 207 | | } |
|---|
| 208 | 205 | |
|---|
| 209 | 206 | memset( p_sys, 0, sizeof(*p_sys) ); |
|---|
| … | … | |
| 215 | 212 | p_sys->psz_stype = avahi_strdup( psz_stype ); |
|---|
| 216 | 213 | if( p_sys->psz_name == NULL || p_sys->psz_stype == NULL ) |
|---|
| 217 | | { |
|---|
| 218 | | msg_Err( p_sys->p_log, "out of memory" ); |
|---|
| 219 | | goto error; |
|---|
| 220 | | } |
|---|
| | 214 | goto error; |
|---|
| 221 | 215 | |
|---|
| 222 | 216 | if( psz_txt != NULL ) |
|---|
| … | … | |
| 224 | 218 | p_sys->psz_txt = avahi_strdup( psz_txt ); |
|---|
| 225 | 219 | if( p_sys->psz_txt == NULL ) |
|---|
| 226 | | { |
|---|
| 227 | | msg_Err( p_sys->p_log, "out of memory" ); |
|---|
| 228 | 220 | goto error; |
|---|
| 229 | | } |
|---|
| 230 | 221 | } |
|---|
| 231 | 222 | |
|---|
| … | … | |
| 252 | 243 | sizeof(poll_thread_t) ); |
|---|
| 253 | 244 | if( p_sys->poll_thread == NULL ) |
|---|
| 254 | | { |
|---|
| 255 | | msg_Err( p_sys->p_log, "out of memory" ); |
|---|
| 256 | | goto error; |
|---|
| 257 | | } |
|---|
| | 245 | goto error; |
|---|
| 258 | 246 | p_sys->poll_thread->simple_poll = p_sys->simple_poll; |
|---|
| 259 | 247 | |
|---|
| r3561b9b |
r172e22c |
|
| 172 | 172 | if( !( p_sys = p_access->p_sys = |
|---|
| 173 | 173 | malloc( sizeof( sout_access_out_sys_t ) ) ) ) |
|---|
| 174 | | { |
|---|
| 175 | | msg_Err( p_access, "Not enough memory" ); |
|---|
| 176 | 174 | return VLC_ENOMEM ; |
|---|
| 177 | | } |
|---|
| 178 | 175 | |
|---|
| 179 | 176 | config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg ); |
|---|
| r3561b9b |
r172e22c |
|
| 185 | 185 | |
|---|
| 186 | 186 | psz_accessname = psz_parser = strdup( p_access->psz_path ); |
|---|
| | 187 | if( !psz_parser ) |
|---|
| | 188 | return VLC_ENOMEM; |
|---|
| 187 | 189 | |
|---|
| 188 | 190 | if( !p_access->psz_path ) |
|---|
| … | … | |
| 213 | 215 | if( !p_sys ) |
|---|
| 214 | 216 | { |
|---|
| 215 | | msg_Err( p_access, "out of memory" ); |
|---|
| 216 | 217 | free( psz_accessname ); |
|---|
| 217 | 218 | return VLC_ENOMEM; |
|---|
| rbcab891 |
r172e22c |
|
| 214 | 214 | buf16 = malloc( buf16_size ); |
|---|
| 215 | 215 | if( buf16 == NULL ) |
|---|
| 216 | | { |
|---|
| 217 | | msg_Err( p_demux, "out of memory" ); |
|---|
| 218 | | return NULL; |
|---|
| 219 | | } |
|---|
| | 216 | return NULL; |
|---|
| 220 | 217 | |
|---|
| 221 | 218 | for( i = 0; i < length; i++ ) |
|---|
| … | … | |
| 233 | 230 | if( buf8 == NULL ) |
|---|
| 234 | 231 | { |
|---|
| 235 | | msg_Err( p_demux, "out of memory" ); |
|---|
| 236 | 232 | free( buf16 ); |
|---|
| 237 | 233 | return NULL; |
|---|
| r320337e |
r172e22c |
|
| 729 | 729 | if( !prg ) |
|---|
| 730 | 730 | { |
|---|
| 731 | | msg_Err( p_demux, "out of memory" ); |
|---|
| 732 | 731 | Close( VLC_OBJECT(p_demux) ); |
|---|
| 733 | 732 | return VLC_ENOMEM; |
|---|
| r3561b9b |
r172e22c |
|
| 132 | 132 | p_sys = malloc( sizeof( filter_sys_t ) ); |
|---|
| 133 | 133 | if( !p_sys ) |
|---|
| 134 | | { |
|---|
| 135 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 136 | 134 | return VLC_ENOMEM; |
|---|
| 137 | | } |
|---|
| 138 | 135 | |
|---|
| 139 | 136 | /* Initialize psz_template */ |
|---|
| … | … | |
| 141 | 138 | if( !p_sys->psz_template ) |
|---|
| 142 | 139 | { |
|---|
| 143 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 144 | 140 | free( p_sys ); |
|---|
| 145 | 141 | return VLC_ENOMEM; |
|---|
| … | … | |
| 205 | 201 | psz_template = malloc( ( s.st_size + 42 ) * sizeof( char ) ); |
|---|
| 206 | 202 | if( !psz_template ) |
|---|
| 207 | | { |
|---|
| 208 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 209 | 203 | return NULL; |
|---|
| 210 | | } |
|---|
| 211 | 204 | memset( psz_template, 0, s.st_size + 1 ); |
|---|
| 212 | 205 | fread( psz_template, s.st_size, 1, file ); |
|---|
| … | … | |
| 452 | 445 | p_svg = ( svg_rendition_t * )malloc( sizeof( svg_rendition_t ) ); |
|---|
| 453 | 446 | if( !p_svg ) |
|---|
| 454 | | { |
|---|
| 455 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 456 | 447 | return VLC_ENOMEM; |
|---|
| 457 | | } |
|---|
| 458 | 448 | |
|---|
| 459 | 449 | p_region_out->i_x = p_region_in->i_x; |
|---|
| … | … | |
| 468 | 458 | if( !p_svg->psz_text ) |
|---|
| 469 | 459 | { |
|---|
| 470 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 471 | 460 | free( p_svg ); |
|---|
| 472 | 461 | return VLC_ENOMEM; |
|---|
| … | … | |
| 483 | 472 | if( !p_svg->psz_text ) |
|---|
| 484 | 473 | { |
|---|
| 485 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 486 | 474 | free( p_svg ); |
|---|
| 487 | 475 | return VLC_ENOMEM; |
|---|
| r3561b9b |
r172e22c |
|
| 152 | 152 | p_filter->p_sys = p_sys = malloc( sizeof( filter_sys_t ) ); |
|---|
| 153 | 153 | if( !p_sys ) |
|---|
| 154 | | { |
|---|
| 155 | | msg_Err( p_filter, "out of memory" ); |
|---|
| 156 | 154 | return VLC_ENOMEM; |
|---|
| 157 | | } |
|---|
| 158 | 155 | p_sys->i_font_size = 0; |
|---|
| 159 | 156 | p_sys->i_display_height = 0; |
|---|
| r3561b9b |
r172e22c |
|
| 204 | 204 | if( ( p_dec->p_sys = p_sys = |
|---|
| 205 | 205 | (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL ) |
|---|
| 206 | | { |
|---|
| 207 | | msg_Err( p_dec, "out of memory" ); |
|---|
| 208 | | return VLC_EGENERIC; |
|---|
| 209 | | } |
|---|
| | 206 | return VLC_ENOMEM; |
|---|
| 210 | 207 | |
|---|
| 211 | 208 | /* Misc init */ |
|---|
| r3561b9b |
r172e22c |
|
| 161 | 161 | /* Allocate the memory needed to store the decoder's structure */ |
|---|
| 162 | 162 | if( ( p_dec->p_sys = p_sys = malloc( sizeof(decoder_sys_t) ) ) == NULL ) |
|---|
| 163 | | { |
|---|
| 164 | | msg_Err( p_dec, "out of memory" ); |
|---|
| 165 | | return VLC_EGENERIC; |
|---|
| 166 | | } |
|---|
| | 163 | return VLC_ENOMEM; |
|---|
| 167 | 164 | memset( p_sys, 0, sizeof(decoder_sys_t) ); |
|---|
| 168 | 165 | |
|---|
| r025c96a |
r172e22c |
|
| 114 | 114 | * message queue */ |
|---|
| 115 | 115 | if( DirectXCreateWindow( p_event->p_vout ) ) |
|---|
| 116 | | { |
|---|
| 117 | | msg_Err( p_event, "out of memory" ); |
|---|
| 118 | 116 | p_event->b_dead = true; |
|---|
| 119 | | } |
|---|
| 120 | 117 | |
|---|
| 121 | 118 | /* Signal the creation of the window */ |
|---|