Commit b7b4d99a authored by Paul B Mahol's avatar Paul B Mahol

avfilter/avf_showfreqs: fix possible null pointer dereference

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 47cd85e1
......@@ -459,8 +459,10 @@ static av_cold void uninit(AVFilterContext *ctx)
av_fft_end(s->fft);
for (i = 0; i < s->nb_channels; i++) {
av_freep(&s->fft_data[i]);
av_freep(&s->avg_data[i]);
if (s->fft_data)
av_freep(&s->fft_data[i]);
if (s->avg_data)
av_freep(&s->avg_data[i]);
}
av_freep(&s->fft_data);
av_freep(&s->avg_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment