vlc | branch: master | Hugo Beauzée-Luyssen <h...@beauzee.fr> | Thu Sep 15 
12:35:35 2016 +0200| [edb70ceaf74cf81a09d4fc4b9c820231bdae4016] | committer: 
Hugo Beauzée-Luyssen

ttml codec: Fix leak on error

fix cid #1372943

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

 modules/codec/substtml.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
index 8f23b42..99462ba 100644
--- a/modules/codec/substtml.c
+++ b/modules/codec/substtml.c
@@ -259,7 +259,10 @@ static ttml_style_t* ParseTTMLStyle( decoder_t *p_dec, 
xml_reader_t* p_reader, c
                 char *tmp;
                 char *value = strdup( val );
                 if( unlikely( value == NULL ) )
+                {
+                    CleanupStyle( p_ttml_style );
                     return NULL;
+                }
 
                 char *token = strtok_r( value , " ", &tmp );
                 ttml_style_t* p_style = FindTextStyle( p_dec, token );

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to