From: Pavel Hrdina Date: Mon, 21 Jun 2021 11:03:51 +0000 (+0200) Subject: virresctrl: fix starting VMs with cputune.memorytune specified X-Git-Tag: v7.5.0-rc1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36d6da4ebf9b648ca378d93a7cad696f045a5073;p=thirdparty%2Flibvirt.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: 7d2fd6ef0163a939adb7ce0f0fad3b7654c340de Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko --- diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index a03113d4d6..35e92022db 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -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);