[vlc-commits] ttml: Fix leak on error
Hugo Beauzée-Luyssen
git at videolan.org
Thu Dec 31 14:21:05 CET 2015
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Dec 31 14:17:39 2015 +0100| [3f849571fb5f88e9446076af7f2a6d597d1a90ff] | committer: Hugo Beauzée-Luyssen
ttml: Fix leak on error
fix CID #1346970 & #1346968
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f849571fb5f88e9446076af7f2a6d597d1a90ff
---
modules/demux/ttml.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 4eca4bb..d0f7fe7 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -239,7 +239,11 @@ static int ReadTTML( demux_t* p_demux )
{
psz_text = Append( psz_text, " %s = \"%s\"", psz_attr_name, psz_attr_value );
if ( unlikely( psz_text == NULL ) )
+ {
+ free( psz_begin );
+ free( psz_end );
return VLC_ENOMEM;
+ }
}
psz_attr_name = xml_ReaderNextAttr( p_sys->p_reader, &psz_attr_value );
}
More information about the vlc-commits
mailing list