[vlc-commits] subsdec: fix memory leak

Rémi Denis-Courmont git at videolan.org
Sat Aug 22 09:39:28 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 22 10:39:21 2015 +0300| [1f8ca468388512f4deb08130999184392c51db69] | committer: Rémi Denis-Courmont

subsdec: fix memory leak

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

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

diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index 842635d..1c9df6f 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -946,7 +946,10 @@ static text_segment_t* ParseSubtitles( int *pi_align, const char *psz_subtitle )
                 if( !strcasecmp( psz_tagname, "br" ) )
                 {
                     if ( !AppendCharacter( p_segment, '\n' ) )
+                    {
+                        free( psz_tagname );
                         goto fail;
+                    }
                 }
                 else if( !strcasecmp( psz_tagname, "b" ) )
                 {



More information about the vlc-commits mailing list