Browse Source

avfilter/af_join: fix possible memory leaks

Allocation of input frames is independent from
allocation of new input pads.
tags/n4.3
Paul B Mahol 5 years ago
parent
commit
aa26f83bdd
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavfilter/af_join.c

+ 4
- 1
libavfilter/af_join.c View File

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


Loading…
Cancel
Save