Commit 143e2d0d authored by Zhao Zhili's avatar Zhao Zhili Committed by Andreas Rheinhardt

avformat/mov: fix memleaks

Fix two cases of memleaks:
1. The leak of dv_demux
2. The leak of dv_fctx upon dv_demux allocate failure
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit f3dc38a186b2326ce03e50969897ea703817ddb0)
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 7c1ad9d1
......@@ -7391,10 +7391,9 @@ static int mov_read_close(AVFormatContext *s)
av_freep(&sc->coll);
}
if (mov->dv_demux) {
avformat_free_context(mov->dv_fctx);
mov->dv_fctx = NULL;
}
av_freep(&mov->dv_demux);
avformat_free_context(mov->dv_fctx);
mov->dv_fctx = NULL;
if (mov->meta_keys) {
for (i = 1; i < mov->meta_keys_count; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment