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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 22d06b39ce avfilter/avfilter: fix memory leak of filter name in 
ff_filter_alloc error path
22d06b39ce is described below

commit 22d06b39ce0545ce597f090d84f60c1a2b04fd25
Author:     jiangjie <[email protected]>
AuthorDate: Wed May 13 20:06:06 2026 +0800
Commit:     jiangjie <[email protected]>
CommitDate: Wed May 13 20:11:19 2026 +0800

    avfilter/avfilter: fix memory leak of filter name in ff_filter_alloc error 
path
    
    When ff_filter_alloc fails after the name has been allocated (via
    av_strdup), the error handling code frees inputs and input_pads but
    misses freeing ret->name, causing a memory leak.
    
    Add av_freep(&ret->name) in the error path before freeing inputs.
---
 libavfilter/avfilter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index bb0b665f0c..b15f0b08b4 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -760,6 +760,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, 
const char *inst_name)
 err:
     if (preinited)
         fi->uninit(ret);
+    av_freep(&ret->name);
     av_freep(&ret->inputs);
     av_freep(&ret->input_pads);
     ret->nb_inputs = 0;

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

Reply via email to