[vlc-devel] commit: fix xspf extension parsing for leaking (Ilkka Ollakka )

git version control git at videolan.org
Mon Apr 7 00:31:50 CEST 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Apr  6 23:13:45 2008 +0300| [423e5997ef970cee59b9e0b5bb8ee1dbe36d2b3b]

fix xspf extension parsing for leaking

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=423e5997ef970cee59b9e0b5bb8ee1dbe36d2b3b
---

 modules/demux/playlist/xspf.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 96c74a2..fdab18c 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -558,7 +558,6 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
                            free( psz_uri );
                            psz_uri = psz_tmp;
                         }
-                        /* FIXME: We are leaking that one */
                         p_new_input = input_ItemNewExt( p_playlist, psz_uri,
                                                         NULL, 0, NULL, -1 );
                         free( psz_uri );
@@ -724,6 +723,7 @@ static vlc_bool_t parse_extension_node COMPLEX_INTERFACE
         {
             input_ItemAddSubItem( p_input_item, p_new_input );
             p_input_item = p_new_input;
+            vlc_gc_decref( p_new_input );
         }
         free( psz_title );
     }
@@ -899,6 +899,7 @@ static vlc_bool_t parse_extitem_node COMPLEX_INTERFACE
     if( p_new_input )
     {
         input_ItemAddSubItem( p_input_item, p_new_input );
+        vlc_gc_decref( p_new_input );
         p_demux->p_sys->pp_tracklist[i_href] = NULL;
     }
 




More information about the vlc-devel mailing list