From: Andreas Rheinhardt Date: Mon, 19 Apr 2021 01:22:42 +0000 (+0200) Subject: avcodec/exr: Return correct error code on allocation failure X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=da6e137cb6e81e2389cf62dca2b1f957862a8498;p=ffmpeg avcodec/exr: Return correct error code on allocation failure Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Rheinhardt --- diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 49c47741455..4f55609b0cc 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -2245,7 +2245,7 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate thread data, used for non EXR_RAW compression types s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData)); if (!s->thread_data) - return AVERROR_INVALIDDATA; + return AVERROR(ENOMEM); return 0; }