[vlc-devel] commit: asx: Fix an input_item leak. (Pierre d'Herbemont )

git version control git at videolan.org
Wed Aug 27 01:14:51 CEST 2008


vlc | branch: 0.9-bugfix | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Aug 26 09:29:37 2008 +0200| [8653696972958812e98f15ecbdcf5a234a147590] | committer: Christophe Mutricy 

asx: Fix an input_item leak.
(cherry picked from commit d64628e719972a782db2b908b95e2050b327391c)

Signed-off-by: Christophe Mutricy <xtophe at videolan.org>

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

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

diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index 8aad20a..08b0b25 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -232,7 +232,6 @@ static int Demux( demux_t *p_demux )
     char        *psz_parse = NULL;
     char        *psz_backup = NULL;
     bool  b_entry = false;
-    input_item_t *p_input;
     INIT_PLAYLIST_STUFF;
 
     /* init txt */
@@ -459,9 +458,11 @@ static int Demux( demux_t *p_demux )
                             psz_string = malloc( i_strlen*sizeof( char ) +1);
                             memcpy( psz_string, psz_backup, i_strlen );
                             psz_string[i_strlen] = '\0';
+                            input_item_t *p_input;
                             p_input = input_item_New( p_demux, psz_string, psz_title_asx );
                             input_item_CopyOptions( p_current_input, p_input );
                             input_item_AddSubItem( p_current_input, p_input );
+                            vlc_gc_decref( p_input );
                             free( psz_string );
                         }
                         else continue;




More information about the vlc-devel mailing list