提交 b193a1d6 编写于 作者: J John Ferlan

xenapi: Resolve Coverity NULL_RETURNS

Coverity points out that the return from virDomainDefParseString is
not checked in xenapiDomainCreateXML like it should be which could
end up in a NULL pointer dereference
上级 467c9059
......@@ -560,6 +560,8 @@ xenapiDomainCreateXML(virConnectPtr conn,
priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
parse_flags);
if (!defPtr)
return NULL;
createVMRecordFromXml(conn, defPtr, &record, &vm);
virDomainDefFree(defPtr);
if (record) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册