aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-09-25 11:56:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-28 14:23:07 +0200
commit8834e080c20d3d23c3ffe779371359f9b9b835ec (patch)
tree97b4e7f38588dd3f4d7430eab66967b0f12ea1cc
parent39dc26f0c104fb601fbe4fb0e66c3aa4341f3cb7 (diff)
downloadffmpeg-8834e080c20d3d23c3ffe779371359f9b9b835ec.tar.gz
avformat/avidec: Fix memleak with dv in avi
Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b98dafe04564d5fe3e5bf5073d871dd93a4a62de) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/avidec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 858011c8de..26b02342a9 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -605,9 +605,13 @@ static int avi_read_header(AVFormatContext *s)
ast = s->streams[0]->priv_data;
av_freep(&s->streams[0]->codecpar->extradata);
av_freep(&s->streams[0]->codecpar);
+ av_freep(&s->streams[0]->codec);
if (s->streams[0]->info)
av_freep(&s->streams[0]->info->duration_error);
av_freep(&s->streams[0]->info);
+ if (s->streams[0]->internal)
+ av_freep(&s->streams[0]->internal->avctx);
+ av_freep(&s->streams[0]->internal);
av_freep(&s->streams[0]);
s->nb_streams = 0;
if (CONFIG_DV_DEMUXER) {