diff options
author | Michael Niedermayer <[email protected]> | 2018-04-06 23:56:57 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2018-06-18 01:16:03 +0200 |
commit | 0f868badcfdb40711e1158b863bfc66d97b028b8 (patch) | |
tree | da761133b0c3d3852e655bf55e29489a16485cc9 | |
parent | ae136f8d6425c318a6c92f7b593582305143e346 (diff) |
avformat/mov: Fix extradata memleak
Fixes: crbug 822705
Reported-by: Matt Wolenetz <[email protected]>
Reviewed-by: Matt Wolenetz <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 0a8133119ca5d087c7c7140d100406ff84c477ee)
Signed-off-by: Michael Niedermayer <[email protected]>
-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 154469e286..f14fd14c7d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2402,6 +2402,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; |