mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/oggdec: fix leak in ogg_restore()
Fixes: asan_bug_leak Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fb6fa48fce
commit
e46ab99750
@ -127,8 +127,12 @@ static int ogg_restore(AVFormatContext *s)
|
||||
|
||||
ogg->state = ost->next;
|
||||
|
||||
for (i = 0; i < ogg->nstreams; i++)
|
||||
for (i = 0; i < ogg->nstreams; i++) {
|
||||
av_freep(&ogg->streams[i].buf);
|
||||
if (i >= ost->nstreams || !ost->streams[i].private) {
|
||||
free_stream(s, i);
|
||||
}
|
||||
}
|
||||
|
||||
avio_seek(bc, ost->pos, SEEK_SET);
|
||||
ogg->page_pos = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user