[FFmpeg-cvslog] lavc/smacker: fix mem leak in case of init failure

Lukasz Marek git at videolan.org
Sun Nov 23 03:35:11 CET 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Sat Nov 22 22:38:17 2014 +0100| [969382162f1884da758934cb86fc4a2c948635dd] | committer: Lukasz Marek

lavc/smacker: fix mem leak in case of init failure

Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=969382162f1884da758934cb86fc4a2c948635dd
---

 libavcodec/smacker.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 518bdad..b5538c7 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -589,6 +589,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     /* decode huffman trees from extradata */
     if(avctx->extradata_size < 16){
         av_log(avctx, AV_LOG_ERROR, "Extradata missing!\n");
+        decode_end(avctx);
         return AVERROR(EINVAL);
     }
 



More information about the ffmpeg-cvslog mailing list