Commit 276823e9 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: subtitle: fix unchecked alloc

parent aee23e64
......@@ -598,10 +598,10 @@ static int Open ( vlc_object_t *p_this )
fmt.psz_description = psz_description;
else
free( psz_description );
if( p_sys->props.psz_header != NULL )
if( p_sys->props.psz_header != NULL &&
(fmt.p_extra = strdup( p_sys->props.psz_header )) )
{
fmt.i_extra = strlen( p_sys->props.psz_header ) + 1;
fmt.p_extra = strdup( p_sys->props.psz_header );
}
p_sys->es = es_out_Add( p_demux->out, &fmt );
......
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