Commit 30b63bf1 authored by Rafaël Carré's avatar Rafaël Carré

Do not malloc(0) - to make valgrind not report 0 byte leaks

(cherry picked from commit 69b32f59)
parent 73e50b29
......@@ -3244,7 +3244,8 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
pid->es->fmt.i_cat = SPU_ES;
pid->es->fmt.i_codec = VLC_FOURCC( 't', 'e', 'l', 'x' );
pid->es->fmt.i_extra = p_dr->i_length;
pid->es->fmt.p_extra = malloc( p_dr->i_length );
pid->es->fmt.p_extra = p_dr->i_length ?
malloc( p_dr->i_length ) : NULL;
if( pid->es->fmt.p_extra )
memcpy( pid->es->fmt.p_extra, p_dr->p_data,
p_dr->i_length );
......
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