Commit 86132d3d authored by Rafaël Carré's avatar Rafaël Carré

Fix memory leak (CID 96)

parent 3cd0536a
......@@ -1916,18 +1916,19 @@ static int UpdateMeta( input_thread_t *p_input, vlc_bool_t b_quick )
if( tk->i_meta > 0 )
{
char *psz_cat = malloc( strlen(_("Stream")) + 10 );
msg_Dbg( p_input, " - track[%d]:", i );
sprintf( psz_cat, "%s %d", _("Stream"), i );
for( j = 0; j < tk->i_meta; j++ )
char *psz_cat;
if( asprintf( &psz_cat, "%s %d", _("Stream"), i ) != -1 )
{
msg_Dbg( p_input, " - '%s' = '%s'", _(tk->name[j]),
tk->value[j] );
for( j = 0; j < tk->i_meta; j++ )
{
msg_Dbg( p_input, " - '%s' = '%s'", _(tk->name[j]),
tk->value[j] );
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_(tk->name[j]), "%s", tk->value[j] );
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_(tk->name[j]), "%s", tk->value[j] );
}
free( psz_cat );
}
}
}
......
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