1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

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

by dereferencing a NULL pointer in the call to
virNodeSuspendGetTargetMask.
This commit is contained in:
Guido Günther 2012-01-20 08:56:39 +01:00
parent c76a17b428
commit 549cedc6a9

View File

@ -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");