From db5604ac26f06be34030c8ae8040c19d549280f1 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 25 Aug 2017 09:49:01 +0200 Subject: [PATCH] avfilter/af_join: check ff_insert_inpad() for failure Signed-off-by: Paul B Mahol --- libavfilter/af_join.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 74ecce052d..f8af0a1804 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -232,7 +232,10 @@ static av_cold int join_init(AVFilterContext *ctx) pad.needs_fifo = 1; - ff_insert_inpad(ctx, i, &pad); + if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { + av_freep(&pad.name); + return ret; + } } return 0;