diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-06 23:56:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-12 23:52:59 +0200 |
commit | 0a8133119ca5d087c7c7140d100406ff84c477ee (patch) | |
tree | 71e3376d9dcfb0a6ad33df1c02182230760fd3db /libavformat/mov.c | |
parent | a06175d7392326201a131fc09b3ea52617f310df (diff) | |
download | ffmpeg-0a8133119ca5d087c7c7140d100406ff84c477ee.tar.gz |
avformat/mov: Fix extradata memleak
Fixes: crbug 822705
Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 97b1462aab..1340bf3913 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2592,6 +2592,12 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom) return mov_finalize_stsd_codec(c, pb, st, sc); fail: + if (sc->extradata) { + int j; + for (j = 0; j < sc->stsd_count; j++) + av_freep(&sc->extradata[j]); + } + av_freep(&sc->extradata); av_freep(&sc->extradata_size); return ret; |