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

Save a few useless strdup() calls

parent 8f85cbbc
...@@ -327,20 +327,17 @@ static int Open( vlc_object_t *p_this ) ...@@ -327,20 +327,17 @@ static int Open( vlc_object_t *p_this )
var_Get( p_stream, SOUT_CFG_PREFIX "name", &val ); var_Get( p_stream, SOUT_CFG_PREFIX "name", &val );
if( *val.psz_string ) if( *val.psz_string )
{ p_session->psz_name = val.psz_string;
p_session->psz_name = strdup( val.psz_string );
}
else else
{ {
p_session->psz_name = strdup( psz_url ); p_session->psz_name = strdup( psz_url );
}
free( val.psz_string ); free( val.psz_string );
}
var_Get( p_stream, SOUT_CFG_PREFIX "group", &val ); var_Get( p_stream, SOUT_CFG_PREFIX "group", &val );
if( *val.psz_string ) if( *val.psz_string )
{ p_session->psz_group = val.psz_string;
p_session->psz_group = strdup( val.psz_string ); else
}
free( val.psz_string ); free( val.psz_string );
/* Now, parse the URL to extract host and port */ /* Now, parse the URL to extract host and port */
......
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