[FFmpeg-cvslog] lavu/opt: dont crash on freeing NULL AVOptionRanges

Lukasz Marek git at videolan.org
Thu Apr 3 19:16:33 CEST 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Thu Apr  3 14:44:43 2014 +0200| [8c272923736861cccfae0befebf09760baf54bf1] | committer: Michael Niedermayer

lavu/opt: dont crash on freeing NULL AVOptionRanges

Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/opt.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index cffa5a6..ea2a5b7 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1608,6 +1608,9 @@ void av_opt_freep_ranges(AVOptionRanges **rangesp)
     int i;
     AVOptionRanges *ranges = *rangesp;
 
+    if (!ranges)
+        return;
+
     for (i = 0; i < ranges->nb_ranges * ranges->nb_components; i++) {
         AVOptionRange *range = ranges->range[i];
         av_freep(&range->str);



More information about the ffmpeg-cvslog mailing list