提交 04ebf058 编写于 作者: J Jim Meyering

virDomainChrDefParseXML: don't leak upon invalid input

* src/conf/domain_conf.c (virDomainChrDefParseXML): Don't leak a
virDomainChrDef buffer upon "unknown target type for char device" error.
上级 6eed3fea
......@@ -1947,6 +1947,7 @@ virDomainChrDefParseXML(virConnectPtr conn,
virDomainReportError(conn, VIR_ERR_XML_ERROR,
_("unknown target type for character device: %s"),
nodeName);
VIR_FREE(def);
return NULL;
}
def->targetType = VIR_DOMAIN_CHR_TARGET_TYPE_NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册