lavu/opt: validate range before dereference
authorLukasz Marek <lukasz.m.luki@gmail.com>
Fri, 4 Apr 2014 17:28:45 +0000 (19:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Apr 2014 22:21:28 +0000 (00:21 +0200)
commit88ec8021ce474b36256b48c741ca9df42316a955
tree1caf2797b3a67b4d60b5d4ea67bf162376ac50b6
parent8130449f32bbf2de1bed23a1a4ef825446e38eea
lavu/opt: validate range before dereference

This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3aac5fcfa9d3748659d78ab2a66d0ccce22cfd4f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opt.c