[FFmpeg-cvslog] avfilter/avf_showfreqs: fix possible null pointer dereference

Paul B Mahol git at videolan.org
Fri Jan 8 14:59:42 CET 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jan  8 14:56:15 2016 +0100| [b7b4d99a1837775afd43bef18954680ecfa683a4] | committer: Paul B Mahol

avfilter/avf_showfreqs: fix possible null pointer dereference

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7b4d99a1837775afd43bef18954680ecfa683a4
---

 libavfilter/avf_showfreqs.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c
index 1b1f441..311dd47 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);



More information about the ffmpeg-cvslog mailing list