]> git.sesse.net Git - vlc/commitdiff
Fix memleak (CID 209)
authorRémi Duraffort <ivoire@videolan.org>
Wed, 1 Oct 2008 19:20:11 +0000 (21:20 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 1 Oct 2008 19:20:11 +0000 (21:20 +0200)
modules/demux/subtitle.c

index 963181b281ff4aaa3a14e9ce6c40e171fbf32767..932b897f0651e3a538553d8c26dcfa67bcfe86f0 100644 (file)
@@ -1968,7 +1968,10 @@ static int ParseDKS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
 
             char *s = TextGetLine( txt );
             if( !s )
+            {
+                free( psz_text );
                 return VLC_EGENERIC;
+            }
 
             if( sscanf( s, "[%d:%d:%d]", &h2, &m2, &s2 ) == 3 )
                 p_subtitle->i_stop  = ( (int64_t)h2 * 3600*1000 +