diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-01-27 09:28:20 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-20 10:51:29 +0200 |
commit | 126cd3821da47971405fd39d9efd162b16b28651 (patch) | |
tree | fb48d18aeb01a67e06b146acb22564b901ac0a7a /libavformat/rtpdec_g726.c | |
parent | fa7d8d63db11fa7eaaf60dc7f6573612f5f3ff98 (diff) | |
download | ffmpeg-126cd3821da47971405fd39d9efd162b16b28651.tar.gz |
avfilter/vf_paletteuse: Fix potential double-free of AVFrame
apply_palette() would free an AVFrame given to it only via an AVFrame *
(and not via AVFrame **) in three of its four exists (namely in the
normal path and in two error paths). So upon error the caller has no way
to know whether the frame has already been freed or not;
load_apply_palette(), the only caller, opted to free the frame in this
scenario.
This commit changes this by making apply_palette not freeing the frame
at all, which is left to load_apply_palette().
Fixes Coverity issue #1452434.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit adea33f46513821c111c602a0692b78315688c1b)
Diffstat (limited to 'libavformat/rtpdec_g726.c')
0 files changed, 0 insertions, 0 deletions