diff mbox series

[FFmpeg-devel,v3,03/25] avfilter/af_acrossover: Free outpads' names generically

Message ID PR3PR03MB666588BB6AF0050DF774BA4D8FC39@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 59b465e4dfc0bb85409bfa777b591d23476ec82b
Headers show
Series [FFmpeg-devel,v3,01/25] avfilter/internal: Uninline ff_insert_(in|out)pad() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 22, 2021, 12:47 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/af_acrossover.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index edb257d634..8306d532ac 100644
--- a/libavfilter/af_acrossover.c
+++ b/libavfilter/af_acrossover.c
@@ -191,10 +191,8 @@  static av_cold int init(AVFilterContext *ctx)
             return AVERROR(ENOMEM);
         pad.name = name;
 
-        if ((ret = ff_append_outpad(ctx, &pad)) < 0) {
-            av_freep(&pad.name);
+        if ((ret = ff_append_outpad_free_name(ctx, &pad)) < 0)
             return ret;
-        }
     }
 
     return ret;
@@ -539,13 +537,9 @@  fail:
 static av_cold void uninit(AVFilterContext *ctx)
 {
     AudioCrossoverContext *s = ctx->priv;
-    int i;
 
     av_freep(&s->fdsp);
     av_frame_free(&s->xover);
-
-    for (i = 0; i < ctx->nb_outputs; i++)
-        av_freep(&ctx->output_pads[i].name);
 }
 
 static const AVFilterPad inputs[] = {