[vlc-commits] substtml: Fix leak on error

Hugo Beauzée-Luyssen git at videolan.org
Thu Dec 31 14:35:57 CET 2015


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Dec 31 14:24:11 2015 +0100| [36eb0436f6eb07138c2a269226a317c01cdc4c58] | committer: Hugo Beauzée-Luyssen

substtml: Fix leak on error

Fix CID #1346962

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

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

diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
index 86631d1..91b7284 100644
--- a/modules/codec/substtml.c
+++ b/modules/codec/substtml.c
@@ -409,6 +409,7 @@ static text_segment_t *ParseTTMLSubtitles( decoder_t *p_dec, subpicture_updater_
 
                     if ( PushStyle( &p_style_stack, p_style ) == false )
                     {
+                        text_segment_Delete( p_segment );
                         goto fail;
                     }
                     p_segment->style = CurrentStyle( p_style_stack );



More information about the vlc-commits mailing list