From 8f26ca26fa9aa12cd336df5a4b580e65cd4729d0 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Thu, 14 Aug 2008 16:01:30 +0200 Subject: [PATCH] xspf: Don't leak input items. Spotted by thedj with the help of our bugreport ml. --- modules/demux/playlist/xspf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c index 42c1ed6e0d..a0d308cd83 100644 --- a/modules/demux/playlist/xspf.c +++ b/modules/demux/playlist/xspf.c @@ -1,3 +1,4 @@ + /******************************************************************************* * xspf.c : XSPF playlist import functions ******************************************************************************* @@ -63,6 +64,12 @@ int Import_xspf( vlc_object_t *p_this ) void Close_xspf( vlc_object_t *p_this ) { demux_t *p_demux = (demux_t *)p_this; + int i; + for(i = 0; i < p_demux->p_sys->i_tracklist_entries; i++) + { + if(p_demux->p_sys->pp_tracklist[i]) + vlc_gc_decref( p_demux->p_sys->pp_tracklist[i] ); + } FREENULL( p_demux->p_sys->pp_tracklist ); FREENULL( p_demux->p_sys->psz_base ); free( p_demux->p_sys ); -- 2.39.2