[FFmpeg-devel] [PATCH V1 1/5] lavfi/af_adeclick: fix double free after ff_filter_frame fail

Paul B Mahol onemda at gmail.com
Mon Aug 19 16:14:10 EEST 2019


LGTM

On Mon, Aug 19, 2019 at 3:08 PM Jun Zhao <mypopydev at gmail.com> wrote:

> From: Jun Zhao <barryjzhao at tencent.com>
>
> ff_filter_frame fail will free the frame, so we just returen after this
> function fail.
>
> Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> ---
>  libavfilter/af_adeclick.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c
> index 50eef74..2c42f97 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;
> --
> 1.7.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list