diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index d9e76fc2ab423f2d25d00015828af0bf10cda5e7..f1322c438c22053039648485ad8fa7d5482db598 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -1112,7 +1112,8 @@ sexpr_to_xend_topology(const struct sexpr *root, virCapsPtr caps) parse_error: virReportError(VIR_ERR_XEN_CALL, "%s", _("topology syntax error")); error: - virCapabilitiesClearHostNUMACellCPUTopology(cpuInfo, nb_cpus); + if (nb_cpus > 0) + virCapabilitiesClearHostNUMACellCPUTopology(cpuInfo, nb_cpus); VIR_FREE(cpuInfo); return -1; }