mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: Do not pass negative ncpus to virCapabilitiesClearHostNUMACellCPUTopology
It won't cause any harm as cpus is NULL when we pass a negative ncpus, but doing so when the function expects unsigned value is not right. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0402a66e8b
commit
6cb5464ab4
@ -1954,6 +1954,7 @@ virCapabilitiesHostNUMAInitReal(virCapsHostNUMA *caps)
|
||||
if (ncpus == -2)
|
||||
continue;
|
||||
|
||||
ncpus = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user