From a8d6b87a4442c690587db6f44cc7ed72a2de81fc Mon Sep 17 00:00:00 2001 From: Leo Izen Date: Wed, 27 Aug 2025 05:26:03 -0400 Subject: [PATCH] avcodec/libjxldec: fix leaked EXIF ifd We're missing a call to av_exif_free here. We leak the internal heap- allocated objects when &ifd goes out of scope. Signed-off-by: Leo Izen --- libavcodec/libjxldec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libjxldec.c b/libavcodec/libjxldec.c index 31f4592d1c..8ce69015bf 100644 --- a/libavcodec/libjxldec.c +++ b/libavcodec/libjxldec.c @@ -519,6 +519,7 @@ static int libjxl_receive_frame(AVCodecContext *avctx, AVFrame *frame) ret = ff_decode_exif_attach_ifd(avctx, ctx->frame, &ifd); if (ret < 0) av_log(avctx, AV_LOG_ERROR, "Unable to attach EXIF ifd\n"); + av_exif_free(&ifd); } if (ctx->basic_info.have_animation) { ctx->frame->pts = av_rescale_q(ctx->accumulated_pts, ctx->anim_timebase, avctx->pkt_timebase);