mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avformat/mov: Don't leak MOVFragmentStreamInfo on error
Fixes Coverity issue #1441933. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
3999c4b374
commit
43f58f2354
@ -1327,8 +1327,10 @@ static int update_frag_index(MOVContext *c, int64_t offset)
|
|||||||
|
|
||||||
for (i = 0; i < c->fc->nb_streams; i++) {
|
for (i = 0; i < c->fc->nb_streams; i++) {
|
||||||
// Avoid building frag index if streams lack track id.
|
// 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;
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
frag_stream_info[i].id = c->fc->streams[i]->id;
|
frag_stream_info[i].id = c->fc->streams[i]->id;
|
||||||
frag_stream_info[i].sidx_pts = AV_NOPTS_VALUE;
|
frag_stream_info[i].sidx_pts = AV_NOPTS_VALUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user