提交 d9c2cfd3 编写于 作者: S Steven Liu

avcodec/bsf: fix resource leak in av_bsf_list_parse_str

cid: 1396268
when av_strdup(str) error, the lst need release
Reviewed-by: NJames Almer <jamrial@gmail.com>
Signed-off-by: NSteven Liu <lq@chinaffmpeg.org>
上级 f48b6b8b
......@@ -514,8 +514,10 @@ int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst)
if (!lst)
return AVERROR(ENOMEM);
if (!(dup = buf = av_strdup(str)))
return AVERROR(ENOMEM);
if (!(dup = buf = av_strdup(str))) {
ret = AVERROR(ENOMEM);
goto end;
}
while (1) {
bsf_str = av_strtok(buf, ",", &saveptr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册