[vlc-commits] XSPF: fix memory leak

Rémi Denis-Courmont git at videolan.org
Sat Jun 4 16:05:33 CEST 2011


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun  4 15:06:39 2011 +0300| [50d38b6da6089d4815e204fcd8126066187bd2c6] | committer: Rémi Denis-Courmont

XSPF: fix memory leak

(cherry picked from commit bba95f3f86bf0ff241b13def7dd81c2af31829f4)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=50d38b6da6089d4815e204fcd8126066187bd2c6
---

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

diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index baa68be..01293e2 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -517,7 +517,10 @@ static bool parse_track_node COMPLEX_INTERFACE
                         pp = realloc( p_sys->pp_tracklist,
                             (p_sys->i_track_id + 1) * sizeof(*pp) );
                         if( !pp )
+                        {
+                            vlc_gc_decref( p_new_input );
                             return false;
+                        }
                         p_sys->pp_tracklist = pp;
                         while( p_sys->i_track_id >= p_sys->i_tracklist_entries )
                             pp[p_sys->i_tracklist_entries++] = NULL;



More information about the vlc-commits mailing list