Commit f3903fca authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

modules/demux/playlist/*.c: Fix input_item memleaks.

parent 5b324033
......@@ -527,6 +527,7 @@ static int Demux( demux_t *p_demux )
if( psz_moreinfo_entry ) input_item_SetURL( p_entry, psz_moreinfo_entry );
if( psz_abstract_entry ) input_item_SetDescription( p_entry, psz_abstract_entry );
input_ItemAddSubItem( p_current_input, p_entry );
vlc_gc_decref( p_entry );
}
/* cleanup entry */;
......
......@@ -266,6 +266,7 @@ static int Demux( demux_t *p_demux )
msg_Err( p_playlist, "Unsupported meta bitrate" );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_name );
FREENULL( psz_mrl );
FREENULL( psz_genre );
......
......@@ -119,7 +119,7 @@ static int Demux( demux_t *p_demux )
input_ItemAddOption( p_input, ppsz_options[i] );
}
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
while( i_options-- ) free( ppsz_options[i_options] );
if( ppsz_options ) free( ppsz_options );
......
......@@ -210,6 +210,7 @@ static int Demux( demux_t *p_demux )
SADD_INFO( "docid", psz_docid );
SADD_INFO( "description", psz_description );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
HANDLE_PLAY_AND_RELEASE;
......
......@@ -92,6 +92,7 @@ static int Demux( demux_t *p_demux )
p_input = input_ItemNewExt( p_playlist, psz_url, psz_url, 0, NULL, -1 );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
HANDLE_PLAY_AND_RELEASE;
......
......@@ -378,7 +378,8 @@ static vlc_bool_t parse_track_dict COMPLEX_INTERFACE
/* add meta info */
add_meta( p_new_input, p_track );
vlc_gc_decref( p_new_input );
p_demux->p_sys->i_ntracks++;
}
else
......
......@@ -192,6 +192,7 @@ static int Demux( demux_t *p_demux )
input_ItemAddInfo( p_input, _(VLC_META_INFO_CAT),
_(VLC_META_ARTIST), "%s", psz_artist );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
free( psz_mrl );
}
......
......@@ -162,6 +162,7 @@ static int Demux( demux_t *p_demux )
0, NULL, -1 );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
else
{
......@@ -221,6 +222,7 @@ static int Demux( demux_t *p_demux )
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,0, NULL, -1 );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
free( psz_mrl_orig );
psz_mrl = NULL;
}
......
......@@ -289,6 +289,7 @@ static int Demux( demux_t *p_demux )
psz_item_size );
}
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_item_name );
FREENULL( psz_item_mrl );
FREENULL( psz_item_size );
......
......@@ -357,11 +357,13 @@ static int Demux( demux_t *p_demux )
SADD_INFO( "href", psz_href );
SADD_INFO( "mime type", psz_mimetype );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
if( psz_qtnext )
{
p_input = input_ItemNewExt( p_sys->p_playlist,
psz_qtnext, NULL, 0, NULL, -1 );
input_ItemAddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
}
......
......@@ -405,6 +405,7 @@ static int Demux ( demux_t *p_demux )
}
input_ItemAddSubItem( p_current_input, p_child );
vlc_gc_decref( p_child );
HANDLE_PLAY_AND_RELEASE
return 0; /* Needed for correct operation of go back */
}
......
......@@ -236,6 +236,7 @@ static int DemuxGenre( demux_t *p_demux )
p_input );
free( psz_mrl );
input_ItemAddSubItem( p_sys->p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_name );
}
FREENULL( psz_eltname );
......@@ -423,7 +424,7 @@ static int DemuxStation( demux_t *p_demux )
if( psz_rt )
input_item_SetRating( p_input, psz_rt );
input_ItemAddSubItem( p_sys->p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_name );
FREENULL( psz_mt );
FREENULL( psz_id );
......
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