This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 240475d3dd54af4945c12c7264b181b8e57c05c3
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Oct 13 05:24:19 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Tue Oct 20 20:41:50 2026 +0000

    avfilter/vf_showinfo: free the frame when av_image_get_linesize() fails
    
    Fixes: lJDYwsOtMQXY
    Fixes: memleak
    Memleak Replicated through UnModified FFmpeg with LSan
    Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24765
---
 libavfilter/vf_showinfo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 9aec0b6004..d81bd0fede 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -779,8 +779,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*frame)
         int linesize = av_image_get_linesize(frame->format, frame->width, 
plane);
         int width = linesize >> (bitdepth > 8);
 
-        if (linesize < 0)
+        if (linesize < 0) {
+            av_frame_free(&frame);
             return linesize;
+        }
 
         for (i = 0; i < h; i++) {
             plane_checksum[plane] = av_adler32_update(plane_checksum[plane], 
data, linesize);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to