mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:03:49 +03:00
virshDomainGetVcpuBitmap: Return bitmap when taking the fallback path
In case the specific VCPU states are not present in the XML we were taking a fallback code path just noting that all cpus of the VM are enabled. This was broken by a mistake in a recent refactor where a 'goto cleanup' was mistakenly replaced by a 'return NULL'. This broke reporting of cpus and also caused a memory leak. Return the fallback cpu map. Fixes: bd1f40fe7d4 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2004429 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
3a90cb03ee
commit
59e74c3193
@ -6710,7 +6710,7 @@ virshDomainGetVcpuBitmap(vshControl *ctl,
|
||||
for (i = 0; i < curvcpus; i++)
|
||||
ignore_value(virBitmapSetBit(ret, i));
|
||||
|
||||
return NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < nnodes; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user