avfilter/af_headphone: do not leak input frames on error
authorPaul B Mahol <onemda@gmail.com>
Mon, 12 Nov 2018 08:38:30 +0000 (09:38 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 12 Nov 2018 08:38:30 +0000 (09:38 +0100)
libavfilter/af_headphone.c

index 0c7e4a2..43e7747 100644 (file)
@@ -587,6 +587,9 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink)
 
 fail:
 
+    for (i = 0; i < s->nb_inputs - 1; i++)
+        av_frame_free(&s->in[i + 1].frame);
+
     av_freep(&data_ir_l);
     av_freep(&data_ir_r);