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

Rémi Duraffort git at videolan.org
Thu Aug 29 14:19:21 CEST 2013


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

Fix memory leak (cid #1048910)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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