diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-11 14:43:47 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-01-14 18:13:29 +0100 |
commit | 0d6605c7ef43f97a88950542af09078adef33b6d (patch) | |
tree | bebe6cfcb70170216a735969662240584227a633 /libavformat | |
parent | 1a4e4ad0e0c5486dcab05e54b587672a498dd7cf (diff) | |
download | ffmpeg-0d6605c7ef43f97a88950542af09078adef33b6d.tar.gz |
mxf: Fix a possible leak of extradata
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mxfdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 7314ddaffc..d3897fad90 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -858,6 +858,8 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int default: /* Private uid used by SONY C0023S01.mxf */ if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) { + av_free(descriptor->extradata); + descriptor->extradata_size = 0; descriptor->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); if (!descriptor->extradata) return AVERROR(ENOMEM); |