From c54c8836cf0ebd7b40f1ceb6c3da1acc583937b1 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 16 Aug 2021 21:39:50 +0200 Subject: [PATCH] avfilter/af_afir: Free inpads' names generically Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt --- libavfilter/af_afir.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index d3868a7f2e..b74e7ddfae 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -792,9 +792,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_frame_free(&s->ir[i]); } - for (unsigned i = 1; i < ctx->nb_inputs; i++) - av_freep(&ctx->input_pads[i].name); - av_frame_free(&s->video); } @@ -849,11 +846,9 @@ static av_cold int init(AVFilterContext *ctx) if (!pad.name) return AVERROR(ENOMEM); - ret = ff_append_inpad(ctx, &pad); - if (ret < 0) { - av_freep(&pad.name); + ret = ff_append_inpad_free_name(ctx, &pad); + if (ret < 0) return ret; - } } pad = (AVFilterPad) {