diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index 5e7196712f566461761b746d0f05ee01dff9bcd1..b5b2328c22ccffb17f7710b3ed6064907d744215 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -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");