[vlc-devel] commit: xspf: Don't leak input items. (Pierre d'Herbemont )
git version control
git at videolan.org
Thu Aug 14 15:59:03 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Thu Aug 14 16:01:30 2008 +0200| [8f26ca26fa9aa12cd336df5a4b580e65cd4729d0] | committer: Pierre d'Herbemont
xspf: Don't leak input items.
Spotted by thedj with the help of our bugreport ml.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f26ca26fa9aa12cd336df5a4b580e65cd4729d0
---
modules/demux/playlist/xspf.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 42c1ed6..a0d308c 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 );
More information about the vlc-devel
mailing list