avcodec/tiff: Fix leak on error

Fixes Coverity issue #1516957.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-17 21:49:04 +02:00
parent 62929f40ee
commit 2c94b1bbf1
1 changed files with 3 additions and 1 deletions

View File

@ -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) {