[vlc-commits] demux: ttml: fix leaks (cid #1346970, cid #1346969)

Francois Cartegnie git at videolan.org
Thu Dec 31 15:29:44 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 31 14:46:42 2015 +0100| [01ae91fc42e7d28b0217368fabdfc1fed97cd23e] | committer: Francois Cartegnie

demux: ttml: fix leaks (cid #1346970, cid #1346969)

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

 modules/demux/ttml.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 044fa3e..388bf52 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -231,9 +231,9 @@ static int ReadTTML( demux_t* p_demux )
 
             while ( psz_attr_name && psz_attr_value )
             {
-                if ( !strcasecmp( psz_attr_name, "begin" ) )
+                if ( !psz_begin && !strcasecmp( psz_attr_name, "begin" ) )
                     psz_begin = strdup( psz_attr_value );
-                else if ( !strcasecmp( psz_attr_name, "end" ) )
+                else if ( !psz_end && !strcasecmp( psz_attr_name, "end" ) )
                     psz_end = strdup( psz_attr_value );
                 else if ( !strcasecmp( psz_attr_name, psz_attr_name ) )
                 {



More information about the vlc-commits mailing list