lavfi/af_adeclick: fix double free after ff_filter_frame fail
authorJun Zhao <barryjzhao@tencent.com>
Mon, 19 Aug 2019 04:54:27 +0000 (12:54 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Tue, 20 Aug 2019 02:05:03 +0000 (10:05 +0800)
ff_filter_frame fail will free the frame, so we just returen after this
function fail.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavfilter/af_adeclick.c

index 50eef74..2c42f97 100644 (file)
@@ -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;