summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-21 16:03:22 +0200
committerPaul B Mahol <onemda@gmail.com>2019-10-21 16:04:48 +0200
commitaa26f83bdd7ea1f5850520fc25aae38315f6338b (patch)
treeb6325b58381da0eda051e95083f765b9340d5840 /libavfilter
parent9c3178808ddf95b33589cd3d6210cff0ed2e3c5e (diff)
avfilter/af_join: fix possible memory leaks
Allocation of input frames is independent from allocation of new input pads.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_join.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index e5d178c1ce..ea03b60d67 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -207,9 +207,12 @@ static av_cold void join_uninit(AVFilterContext *ctx)
JoinContext *s = ctx->priv;
int i;
+ for (i = 0; i < s->inputs && s->input_frames; i++) {
+ av_frame_free(&s->input_frames[i]);
+ }
+
for (i = 0; i < ctx->nb_inputs; i++) {
av_freep(&ctx->input_pads[i].name);
- av_frame_free(&s->input_frames[i]);
}
av_freep(&s->channels);