diff options
author | wm4 <nfxjfg@googlemail.com> | 2014-12-15 04:32:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-15 04:46:30 +0100 |
commit | a400edbb6d00c0211de38e4f1b4f593681db91d8 (patch) | |
tree | 3a3ef32f10f8e758e916de720f5a750fe578426f /libavutil/frame.c | |
parent | 4fa42e04ed48a2a9ec5bff6cff9355e410dda574 (diff) | |
download | ffmpeg-a400edbb6d00c0211de38e4f1b4f593681db91d8.tar.gz |
lavu/frame: fix malloc error path in av_frame_copy_props()
The error path frees all side data, but forgets to reset the side data
count. This can blow up later in av_frame_unref() and free_side_data().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r-- | libavutil/frame.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c index 4ee06306ce..5c9aa2914c 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -503,6 +503,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) free_side_data(&dst->side_data[i]); } av_freep(&dst->side_data); + dst->nb_side_data = 0; return AVERROR(ENOMEM); } memcpy(sd_dst->data, sd_src->data, sd_src->size); |