[FFmpeg-cvslog] avformat/mov: Don't leak MOVFragmentStreamInfo on error
Andreas Rheinhardt
git at videolan.org
Tue Jan 28 18:20:26 EET 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Jan 27 09:28:19 2020 +0100| [43f58f2354bfab3819e44c1a97b0af75cc091226] | committer: Michael Niedermayer
avformat/mov: Don't leak MOVFragmentStreamInfo on error
Fixes Coverity issue #1441933.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=43f58f2354bfab3819e44c1a97b0af75cc091226
---
libavformat/mov.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b9e32874c4..3a183ed015 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1327,8 +1327,10 @@ static int update_frag_index(MOVContext *c, int64_t offset)
for (i = 0; i < c->fc->nb_streams; i++) {
// Avoid building frag index if streams lack track id.
- if (c->fc->streams[i]->id < 0)
+ if (c->fc->streams[i]->id < 0) {
+ av_free(frag_stream_info);
return AVERROR_INVALIDDATA;
+ }
frag_stream_info[i].id = c->fc->streams[i]->id;
frag_stream_info[i].sidx_pts = AV_NOPTS_VALUE;
More information about the ffmpeg-cvslog
mailing list