提交 abb82f53 编写于 作者: D Daniel P. Berrange

Fix use-after-free in handling domain taint flags

* src/conf/domain_conf.c: Fix use after free
上级 caf808c7
......@@ -6731,12 +6731,13 @@ static virDomainObjPtr virDomainObjParseXML(virCapsPtr caps,
char *str = virXMLPropString(nodes[i], "flag");
if (str) {
int flag = virDomainTaintTypeFromString(str);
VIR_FREE(str);
if (flag < 0) {
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
_("Unknown taint flag %s"), str);
VIR_FREE(str);
goto error;
}
VIR_FREE(str);
virDomainObjTaint(obj, flag);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册