Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Zhili <quinkblack@foxmail.com>2020-06-28 06:15:39 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-01 17:17:14 +0300
commit067277da5c7c7f3efa3ba327731adcc1932f6b6c (patch)
treed2d94d813c9a1df37c9f17b8a2b51809a450f381 /libavformat
parent4faf2eee1c3da157f1ab67772c7a01ac231429c3 (diff)
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit f3dc38a186b2326ce03e50969897ea703817ddb0) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 40774d3911..6ff5e0d82d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6635,10 +6635,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++) {