ffmpeg | branch: master | Steven Liu <l...@chinaffmpeg.org> | Thu Oct 10 
10:07:55 2019 +0800| [70c6e8406984d435543fe172dae481c8de491619] | committer: 
Steven Liu

avformat/swfdec: fix memleak when inflateInit failed

Signed-off-by: Steven Liu <l...@chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=70c6e8406984d435543fe172dae481c8de491619
---

 libavformat/swfdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 85bd30404e..a9358f09a9 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to