aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-11 14:43:47 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-01-14 18:13:29 +0100
commit0d6605c7ef43f97a88950542af09078adef33b6d (patch)
treebebe6cfcb70170216a735969662240584227a633 /libavformat
parent1a4e4ad0e0c5486dcab05e54b587672a498dd7cf (diff)
downloadffmpeg-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.c2
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);