[FFmpeg-cvslog] avfilter/af_biquads: fix possible leak on error

Paul B Mahol git at videolan.org
Tue Mar 15 17:22:54 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Mar 15 16:21:18 2022 +0100| [93a076db70b4addf3b1924fb6fc98343035564cb] | committer: Paul B Mahol

avfilter/af_biquads: fix possible leak on error

Recently introduced.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93a076db70b4addf3b1924fb6fc98343035564cb
---

 libavfilter/af_biquads.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
index 9a3126c650..a1fe1ec72a 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -875,8 +875,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
         return ff_filter_frame(outlink, buf);
 
     ret = av_channel_layout_copy(&s->ch_layout, &inlink->ch_layout);
-    if (ret < 0)
+    if (ret < 0) {
+        av_frame_free(&buf);
         return ret;
+    }
     if (strcmp(s->ch_layout_str, "all"))
         av_channel_layout_from_string(&s->ch_layout,
                                       s->ch_layout_str);



More information about the ffmpeg-cvslog mailing list