avfilter/af_afir: Free inpads' names generically

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-08-16 21:39:50 +02:00
parent 59b465e4df
commit c54c8836cf
1 changed files with 2 additions and 7 deletions

View File

@ -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) {