PR #24525 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24525
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24525.patch

Fixes: memleak
Found during triage/review of the security report XoynvIRQMj1M



>From 6cd1d12e4e2be1f0bf9ef22fef8844e33fbe43bd Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Tue, 15 Sep 2026 06:10:13 +0200
Subject: [PATCH] avformat/hlsenc: free the segment buffer when the muxer fails
 to initialize

Fixes: memleak
Found during triage/review of the security report XoynvIRQMj1M
---
 libavformat/hlsenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 4726a4a708..4b7a3a2690 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2724,6 +2724,8 @@ static void hls_deinit(AVFormatContext *s)
         av_freep(&vs->vtt_m3u8_name);
 
         avformat_free_context(vs->vtt_avf);
+        if (vs->avf)
+            ffio_free_dyn_buf(&vs->avf->pb);
         avformat_free_context(vs->avf);
         if (hls->resend_init_file)
             av_freep(&vs->init_buffer);
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to