提交 549cedc6 编写于 作者: G Guido Günther

xen: Don't crash when we fail to init caps

by dereferencing a NULL pointer in the call to
virNodeSuspendGetTargetMask.
上级 c76a17b4
......@@ -2764,6 +2764,8 @@ xenHypervisorMakeCapabilities(virConnectPtr conn)
utsname.machine,
cpuinfo,
capabilities);
if (caps == NULL)
return NULL;
if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
VIR_WARN("Failed to get host power management capabilities");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册