Changeset 4eb79afcdc96124bfab813040e534761ac2ed99b

Show
Ignore:
Timestamp:
11/02/08 16:48:25 (8 months ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1202744905 +0000
git-parent:

[2c5cd248e79197b1c2b181871946135f876c3bc9]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1202744905 +0000
Message:

Check malloc return value

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/stream_out/standard.c

    rc76522a r4eb79af  
    3232#include <vlc_sout.h> 
    3333 
    34  
    3534#include <vlc_network.h> 
    3635#include "vlc_url.h" 
     
    173172    if( !*val.psz_string ) free( val.psz_string ); 
    174173 
    175  
    176174    var_Get( p_stream, SOUT_CFG_PREFIX "dst", &val ); 
    177175    psz_url = *val.psz_string ? val.psz_string : NULL; 
     
    179177 
    180178    p_sys = p_stream->p_sys = malloc( sizeof( sout_stream_sys_t) ); 
     179    if( !p_sys ) return VLC_ENOMEM; 
    181180    p_stream->p_sys->p_session = NULL; 
    182181 
  • src/stream_output/stream_output.c

    r99fab90 r4eb79af  
    527527    /* create a new sout input */ 
    528528    p_input = malloc( sizeof( sout_input_t ) ); 
     529    if( !p_input ) 
     530    { 
     531        msg_Err( p_mux, "out of memory" ); 
     532        return NULL; 
     533    } 
    529534    p_input->p_sout = p_mux->p_sout; 
    530535    p_input->p_fmt  = p_fmt;