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);