提交 e47024d7 编写于 作者: M Michael Niedermayer

wtvdec: fix memleak on error

Fixes CID718002
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 120b38b9
......@@ -580,8 +580,10 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code
if (!wst)
return NULL;
st = avformat_new_stream(s, NULL);
if (!st)
if (!st) {
av_free(wst);
return NULL;
}
st->id = sid;
st->priv_data = wst;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册