[FFmpeg-cvslog] lavfi/af_adeclick: fix double free after ff_filter_frame fail

Jun Zhao git at videolan.org
Tue Aug 20 05:10:44 EEST 2019


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Mon Aug 19 12:54:27 2019 +0800| [df6876d69172140eb315a914a924abece2c6481a] | committer: Jun Zhao

lavfi/af_adeclick: fix double free after ff_filter_frame fail

ff_filter_frame fail will free the frame, so we just returen after this
function fail.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

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

 libavfilter/af_adeclick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c
index 50eef74921..2c42f97960 100644
--- a/libavfilter/af_adeclick.c
+++ b/libavfilter/af_adeclick.c
@@ -592,7 +592,7 @@ static int filter_frame(AVFilterLink *inlink)
 
     ret = ff_filter_frame(outlink, out);
     if (ret < 0)
-        goto fail;
+        return ret;
 
     if (s->samples_left > 0) {
         s->samples_left -= s->hop_size;



More information about the ffmpeg-cvslog mailing list