Commit 70c6e840 authored by Steven Liu's avatar Steven Liu

avformat/swfdec: fix memleak when inflateInit failed

Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent a3655a5c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment