aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Izen <leo.izen@gmail.com>2025-08-27 05:28:31 -0400
committerLeo Izen <leo.izen@gmail.com>2025-08-27 05:28:31 -0400
commit041651841a1e11a6873a1d7b2f826b8678f8a2c8 (patch)
tree8c7d59e878a7dfadf14d3e92d8fe6d5ae7b50fb2
parenta8d6b87a4442c690587db6f44cc7ed72a2de81fc (diff)
downloadffmpeg-041651841a1e11a6873a1d7b2f826b8678f8a2c8.tar.gz
avcodec/libjxlenc: 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 <leo.izen@gmail.com>
-rw-r--r--libavcodec/libjxlenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libjxlenc.c b/libavcodec/libjxlenc.c
index 4f05f015e2..81c8233e40 100644
--- a/libavcodec/libjxlenc.c
+++ b/libavcodec/libjxlenc.c
@@ -394,6 +394,7 @@ static int libjxl_preprocess_stream(AVCodecContext *avctx, const AVFrame *frame,
ret = av_exif_write(avctx, &ifd, &exif_buffer, AV_EXIF_TIFF_HEADER);
if (ret < 0)
av_log(avctx, AV_LOG_WARNING, "unable to process EXIF frame data\n");
+ av_exif_free(&ifd);
} else {
sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX);
if (sd)