mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
nodeinfo: Check for errors when reading core_id
This commit is contained in:
parent
5965c4f3e2
commit
f86c45ca0c
@ -512,7 +512,9 @@ virNodeParseNode(const char *node,
|
||||
/* logical cpu is equivalent to a core on s390 */
|
||||
core = cpu;
|
||||
} else {
|
||||
core = virNodeGetCpuValue(node, cpu, "topology/core_id", 0);
|
||||
if ((core = virNodeGetCpuValue(node, cpu,
|
||||
"topology/core_id", 0)) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
if (core > ID_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
|
Loading…
x
Reference in New Issue
Block a user