mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
xen: Resolve Coverity NEGATIVE_RETURNS
Coverity notes that if the call to virBitmapParse() returns a negative value, then when we jump to the error label, the call to virCapabilitiesClearHostNUMACellCPUTopology() will have issues with the negative nb_cpus Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
34476d720f
commit
947593f6e6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user