From 39df5a583d781d54dcac57b9d024d256d4310172 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Fri, 6 Jun 2025 14:44:50 +0100 Subject: [PATCH 2/3] avformat/dhav: Add missed free for end_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accidentally left out of 36ec9217e6dca3432304c9d76078d9618247eb0f. Found-by: Kacper Michajłow Signed-off-by: Derek Buitenhuis --- libavformat/dhav.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/dhav.c b/libavformat/dhav.c index af1a8d86a5..ffd6d66359 100644 --- a/libavformat/dhav.c +++ b/libavformat/dhav.c @@ -281,6 +281,7 @@ static int64_t get_duration(AVFormatContext *s) } if (end_pos < 0 || end_pos + 16 > end_buffer_pos + end_buffer_size) { + av_freep(&end_buffer); avio_seek(s->pb, start_pos, SEEK_SET); return 0; } @@ -289,6 +290,8 @@ static int64_t get_duration(AVFormatContext *s) get_timeinfo(date, &timeinfo); end = av_timegm(&timeinfo) * 1000LL; + av_freep(&end_buffer); + avio_seek(s->pb, start_pos, SEEK_SET); return end - start; -- 2.45.2