summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2019-10-10 10:07:55 +0800
committerSteven Liu <lq@chinaffmpeg.org>2019-10-28 14:26:20 +0800
commit70c6e8406984d435543fe172dae481c8de491619 (patch)
treedee6f3a67a6125002f902d3a7f7087fc96e559b6 /libavformat
parenta3655a5cb2abf3bf2c8a2fa596643059de3396e4 (diff)
downloadffmpeg-streaming-70c6e8406984d435543fe172dae481c8de491619.zip
ffmpeg-streaming-70c6e8406984d435543fe172dae481c8de491619.tar.gz
avformat/swfdec: fix memleak when inflateInit failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/swfdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 85bd304..a9358f0 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -152,6 +152,8 @@ static int swf_read_header(AVFormatContext *s)
swf->zpb->seekable = 0;
if (inflateInit(&swf->zstream) != Z_OK) {
av_log(s, AV_LOG_ERROR, "Unable to init zlib context\n");
+ av_freep(&swf->zbuf_in);
+ av_freep(&swf->zbuf_out);
return AVERROR(EINVAL);
}
pb = swf->zpb;
OpenPOWER on IntegriCloud