lavc/smacker: fix mem leak in case of init failure
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Sat, 22 Nov 2014 21:38:17 +0000 (22:38 +0100)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Sun, 23 Nov 2014 02:25:34 +0000 (03:25 +0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavcodec/smacker.c

index 518bdad..b5538c7 100644 (file)
@@ -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);
     }