diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-01-08 16:56:15 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-01-08 16:58:43 +0300 |
commit | b7b4d99a1837775afd43bef18954680ecfa683a4 (patch) | |
tree | d6d72c67e9026b3c6f38a1ce865a7b432d18ddab /libavfilter/avf_showfreqs.c | |
parent | 47cd85e1e5b116312f5a8738e61c550ab91b6db8 (diff) |
avfilter/avf_showfreqs: fix possible null pointer dereference
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/avf_showfreqs.c')
-rw-r--r-- | libavfilter/avf_showfreqs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index 1b1f441a6e..311dd478bd 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -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); |