[vlc-commits] ttml: Fix potential leak

Hugo Beauzée-Luyssen git at videolan.org
Thu Sep 15 13:16:21 CEST 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Sep 15 12:00:42 2016 +0200| [ff9e68c2a2bbdd9ff8fa37f1c4a266ed0de6eb4a] | committer: Hugo Beauzée-Luyssen

ttml: Fix potential leak

fix cid #1372946

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

 modules/demux/ttml.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index c91c62e..c6d68ee 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -544,7 +544,10 @@ static int ParseTimeOnSpan( demux_sys_t* p_sys, char* psz_text )
             {
                 char* psz_transparent= setOpacityToZero( pp_subtitles[k]->psz_text );
                 if( unlikely( psz_transparent == NULL ) )
+                {
+                    free( psz_sub );
                     goto error;
+                }
 
                 psz_sub = Append( psz_sub, "%s",  psz_transparent );
                 free( psz_transparent );



More information about the vlc-commits mailing list