Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index 587ad82a00..32756b54f3 100644 --- a/libavcodec/smvjpegdec.c +++ b/libavcodec/smvjpegdec.c @@ -120,6 +120,10 @@ static av_cold int smvjpeg_decode_init(AVCodecContext *avctx) } s->avctx = avcodec_alloc_context3(codec); + if (!s->avctx) { + smvjpeg_decode_end(avctx); + return AVERROR(ENOMEM); + } av_dict_set(&thread_opt, "threads", "1", 0); s->avctx->refcounted_frames = 1;
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/smvjpegdec.c | 4 ++++ 1 file changed, 4 insertions(+)