aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-17 21:49:04 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-20 14:15:48 +0200
commit2c94b1bbf101200c13293130cf86c9be9c397885 (patch)
tree0a08b4083756791124f7fa0c945a8d91f013c8fb
parent62929f40ee7ce1eb2c4b178b98557b7c73f8bc47 (diff)
downloadffmpeg-2c94b1bbf101200c13293130cf86c9be9c397885.tar.gz
avcodec/tiff: Fix leak on error
Fixes Coverity issue #1516957. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/tiff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 6157071792..05ab0e70b0 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -2267,8 +2267,10 @@ again:
group_size = s->width * channels;
tmpbuf = av_malloc(ssize);
- if (!tmpbuf)
+ if (!tmpbuf) {
+ av_free(five_planes);
return AVERROR(ENOMEM);
+ }
if (s->avctx->pix_fmt == AV_PIX_FMT_RGBF32LE ||
s->avctx->pix_fmt == AV_PIX_FMT_RGBAF32LE) {