[vlc-commits] Fix memory leak (cid #1048910)

Rémi Duraffort git at videolan.org
Mon Sep 2 17:48:49 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 28 20:15:12 2013 +0200| [cd6f087fc0055eb910a6117f3f896dc75f7212ef] | committer: Jean-Baptiste Kempf

Fix memory leak (cid #1048910)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit e5beadb8b156b406175a6d3154169f224e2d4168)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/cc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/cc.c b/modules/codec/cc.c
index 8863f1c..7931e31 100644
--- a/modules/codec/cc.c
+++ b/modules/codec/cc.c
@@ -305,6 +305,8 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
     if( i_pts <= VLC_TS_INVALID )
     {
         msg_Warn( p_dec, "subtitle without a date" );
+        free( psz_subtitle );
+        free( psz_html );
         return NULL;
     }
 



More information about the vlc-commits mailing list