Commit 14a2f2e6 authored by Rémi Duraffort's avatar Rémi Duraffort

Check malloc return value.

parent e218b42d
...@@ -498,10 +498,12 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -498,10 +498,12 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
sout_stream_id_t *id; sout_stream_id_t *id;
id = malloc( sizeof( sout_stream_id_t ) ); id = malloc( sizeof( sout_stream_id_t ) );
if( !id )
return NULL;
if( ( id->p_input = sout_MuxAddStream( p_sys->p_mux, p_fmt ) ) == NULL ) if( ( id->p_input = sout_MuxAddStream( p_sys->p_mux, p_fmt ) ) == NULL )
{ {
free( id ); free( id );
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment