mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: Copy bitmap in a sane way
Use virBitmapNewCopy instead of a combination of virBitmapNew and virBitmapCopy.
This commit is contained in:
parent
6afb0d04fe
commit
4c7fb93d5a
@ -4759,12 +4759,10 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
|
||||
if (VIR_ALLOC(vcpupin) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(vcpupin->cpumask =
|
||||
virBitmapNew(VIR_DOMAIN_CPUMASK_LEN))) {
|
||||
if (!(vcpupin->cpumask = virBitmapNewCopy(vm->def->cpumask))) {
|
||||
VIR_FREE(vcpupin);
|
||||
goto cleanup;
|
||||
}
|
||||
virBitmapCopy(vcpupin->cpumask, vm->def->cpumask);
|
||||
vcpupin->id = i;
|
||||
if (VIR_APPEND_ELEMENT_COPY(vm->def->cputune.vcpupin,
|
||||
vm->def->cputune.nvcpupin, vcpupin) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user