Browse Source

avfilter/af_dynaudnorm: fix possible null pointer dereference

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n3.0
Paul B Mahol 9 years ago
parent
commit
70df51112c
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      libavfilter/af_dynaudnorm.c

+ 8
- 4
libavfilter/af_dynaudnorm.c View File

@@ -173,7 +173,8 @@ static cqueue *cqueue_create(int size)

static void cqueue_free(cqueue *q)
{
av_free(q->elements);
if (q)
av_free(q->elements);
av_free(q);
}

@@ -684,9 +685,12 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->fade_factors[1]);

for (c = 0; c < s->channels; c++) {
cqueue_free(s->gain_history_original[c]);
cqueue_free(s->gain_history_minimum[c]);
cqueue_free(s->gain_history_smoothed[c]);
if (s->gain_history_original)
cqueue_free(s->gain_history_original[c]);
if (s->gain_history_minimum)
cqueue_free(s->gain_history_minimum[c]);
if (s->gain_history_smoothed)
cqueue_free(s->gain_history_smoothed[c]);
}

av_freep(&s->gain_history_original);


Loading…
Cancel
Save