[FFmpeg-cvslog] avformat/oggdec: Fix metadata memleak on multiple headers
Michael Niedermayer
git at videolan.org
Wed Mar 7 21:38:07 EET 2018
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Mar 6 18:14:12 2018 +0100| [da069e9c68ec1a54e618940dcb9ebae9bf179a32] | committer: Michael Niedermayer
avformat/oggdec: Fix metadata memleak on multiple headers
Fixes: Chromium bug 800123
Reported-by: Matt Wolenetz <wolenetz at google.com>
Reviewed-by: Matt Wolenetz <wolenetz at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da069e9c68ec1a54e618940dcb9ebae9bf179a32
---
libavformat/oggdec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 38f60653f9..27d16a3e4e 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -128,7 +128,10 @@ static int ogg_restore(AVFormatContext *s)
ogg->state = ost->next;
for (i = 0; i < ogg->nstreams; i++) {
- av_freep(&ogg->streams[i].buf);
+ struct ogg_stream *stream = &ogg->streams[i];
+ av_freep(&stream->buf);
+ av_freep(&stream->new_metadata);
+
if (i >= ost->nstreams || !ost->streams[i].private) {
free_stream(s, i);
}
More information about the ffmpeg-cvslog
mailing list