diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-10-20 20:22:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-11 23:23:36 +0100 |
commit | 88519be8db66811e203408b413d9039ac9c3fe91 (patch) | |
tree | 619c2785819261c5458691da613dbbd8e84669ec | |
parent | 90e4862ffa5457ebee53345b9a52df5fd3842ccf (diff) | |
download | ffmpeg-88519be8db66811e203408b413d9039ac9c3fe91.tar.gz |
avformat/mxfdec: Free all types for both Descriptors
Fixes: memleak
Fixes: 26352/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5201158714687488
Suggested-by: Tomas Härdin <tjoppen@acc.umu.se>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mxfdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 784f43d6d1..4c932e954c 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -343,11 +343,10 @@ static void mxf_free_metadataset(MXFMetadataSet **ctx, int freectx) MXFIndexTableSegment *seg; switch ((*ctx)->type) { case Descriptor: + case MultipleDescriptor: av_freep(&((MXFDescriptor *)*ctx)->extradata); av_freep(&((MXFDescriptor *)*ctx)->mastering); av_freep(&((MXFDescriptor *)*ctx)->coll); - break; - case MultipleDescriptor: av_freep(&((MXFDescriptor *)*ctx)->sub_descriptors_refs); break; case Sequence: |