aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mss1.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-22 22:56:51 +0100
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-23 20:52:38 +0100
commit331fae80a1fb9b027442047fb564c02c6c41e70b (patch)
tree7a1d71fd90408a42367d6f7ef40d8f51e4367512 /libavcodec/mss1.c
parent305b03097db3ccfed4b0b9d91e99fcb34c77da1b (diff)
downloadffmpeg-331fae80a1fb9b027442047fb564c02c6c41e70b.tar.gz
lavc/mss1: fix mem leak in case of init failure
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavcodec/mss1.c')
-rw-r--r--libavcodec/mss1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index 6bb524bc48..2eb67df6b8 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -197,6 +197,8 @@ static av_cold int mss1_decode_init(AVCodecContext *avctx)
return AVERROR(ENOMEM);
ret = ff_mss12_decode_init(&c->ctx, 0, &c->sc, NULL);
+ if (ret < 0)
+ av_frame_free(&c->pic);
avctx->pix_fmt = AV_PIX_FMT_PAL8;