mirror of https://gitee.com/openkylin/libvirt.git
virresctrl: fix starting VMs with cputune.memorytune specified
When removing check for return value of VIR_EXPAND_N this place was
incorrectly modified causing failure to start a VM with cputune
memorytune configured with useless error message:
error: Failed to start domain 'vm1'
error: An error occurred, but the cause is unknown
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973094
Fixes: 7d2fd6ef01
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
71012d7164
commit
36d6da4ebf
|
@ -1437,7 +1437,6 @@ virResctrlAllocParseProcessMemoryBandwidth(virResctrlInfo *resctrl,
|
|||
if (alloc->mem_bw->nbandwidths <= id) {
|
||||
VIR_EXPAND_N(alloc->mem_bw->bandwidths, alloc->mem_bw->nbandwidths,
|
||||
id - alloc->mem_bw->nbandwidths + 1);
|
||||
return -1;
|
||||
}
|
||||
if (!alloc->mem_bw->bandwidths[id])
|
||||
alloc->mem_bw->bandwidths[id] = g_new0(unsigned int, 1);
|
||||
|
|
Loading…
Reference in New Issue