From 9bd1bf382e18a1595f6ded05e87390f79fa0328b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 25 Aug 2017 09:53:46 +0200 Subject: avfilter/f_interleave: check ff_insert_inpad() for failure Signed-off-by: Paul B Mahol --- libavfilter/f_interleave.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libavfilter') diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c index a988900594..d8a73b52e5 100644 --- a/libavfilter/f_interleave.c +++ b/libavfilter/f_interleave.c @@ -110,7 +110,7 @@ static av_cold int init(AVFilterContext *ctx) { InterleaveContext *s = ctx->priv; const AVFilterPad *outpad = &ctx->filter->outputs[0]; - int i; + int i, ret; s->queues = av_calloc(s->nb_inputs, sizeof(s->queues[0])); if (!s->queues) @@ -133,7 +133,10 @@ static av_cold int init(AVFilterContext *ctx) default: av_assert0(0); } - ff_insert_inpad(ctx, i, &inpad); + if ((ret = ff_insert_inpad(ctx, i, &inpad)) < 0) { + av_freep(&inpad.name); + return ret; + } } return 0; -- cgit v1.2.3