[FFmpeg-devel] [PATCH 7/9] avfilter/vf_premultiply: fix memory-leak on failure

Paul B Mahol onemda at gmail.com
Wed Nov 8 21:03:57 EET 2017


On 11/8/17, Timo Rothenpieler <timo at rothenpieler.org> wrote:
> Fixes CID #1416352
> ---
>  libavfilter/vf_premultiply.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c
> index 1af6433bc9..4b6abc6e73 100644
> --- a/libavfilter/vf_premultiply.c
> +++ b/libavfilter/vf_premultiply.c
> @@ -609,9 +609,10 @@ static int activate(AVFilterContext *ctx)
>          int64_t pts;
>
>          if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) {
> -            if ((ret = filter_frame(ctx, &out, frame, frame)) < 0)
> -                return ret;
> +            ret = filter_frame(ctx, &out, frame, frame);
>              av_frame_free(&frame);
> +            if (ret < 0)
> +                return ret;
>              ret = ff_filter_frame(ctx->outputs[0], out);
>          }
>          if (ret < 0) {
> --
> 2.14.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

ok


More information about the ffmpeg-devel mailing list