mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avformat/swfdec: fix memleak when inflateInit failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
a3655a5cb2
commit
70c6e84069
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user