Commit cee010ba authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix memory error handling (CID 123)

parent 1e77ff8b
......@@ -2039,7 +2039,7 @@ static int InputSourceInit( input_thread_t *p_input,
* (and do nothing with a list) */
char *psz_var_demux = var_GetString( p_input, "demux" );
if( *psz_var_demux != '\0' &&
if( psz_var_demux && *psz_var_demux &&
!strchr(psz_var_demux, ',' ) &&
!strchr(psz_var_demux, ':' ) )
{
......@@ -2047,11 +2047,8 @@ static int InputSourceInit( input_thread_t *p_input,
msg_Dbg( p_input, "enforced demux ` %s'", psz_demux );
}
else if( psz_var_demux )
{
free( psz_var_demux );
}
}
/* Try access_demux if no demux given */
if( *psz_demux == '\0' )
......
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