avcodec/tiff: Fix leak on error

Fixes Coverity issue #1516957.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.1
Andreas Rheinhardt 6 months ago
parent 62929f40ee
commit 2c94b1bbf1
  1. 4
      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) {

Loading…
Cancel
Save