]> git.sesse.net Git - vlc/commitdiff
xspf: Don't leak input items.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 14 Aug 2008 14:01:30 +0000 (16:01 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 14 Aug 2008 14:01:58 +0000 (16:01 +0200)
Spotted by thedj with the help of our bugreport ml.

modules/demux/playlist/xspf.c

index 42c1ed6e0d388007b1250ff1b30d09b1a0594922..a0d308cd8330973ed1858fac83dc018f6f0f2039 100644 (file)
@@ -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 );