[vlc-devel] commit: Fix memleak (CID 212) ( Rémi Duraffort )

git version control git at videolan.org
Thu Oct 2 21:13:32 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Duraffort <ivoire at videolan.org> | Wed Oct  1 21:13:54 2008 +0200| [9be864699dba8fddd9f0cc537febae93bf5bb373] | committer: Derk-Jan Hartman 

Fix memleak (CID 212)
(cherry picked from commit 19bca43e040b69139b0eeca9494313baf6db4b21)

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

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

diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 5d3636f..8d86317 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1348,7 +1348,10 @@ static int ParseAQT( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
         const char *s = TextGetLine( txt );
 
         if( !s )
+        {
+            free( psz_text );
             return VLC_EGENERIC;
+        }
 
         /* Data Lines */
         if( sscanf (s, "-->> %d", &t) == 1)




More information about the vlc-devel mailing list