提交 3a1cdb06 编写于 作者: W Wang Huaqiang 提交者: John Ferlan

conf: Fix bug in finding alloc through matching vcpus

The @alloc object returned by virDomainResctrlVcpuMatch is not
properly referenced and un-referenced in virDomainCachetuneDefParse.

This patch fixes this problem.
Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 4c64768e
......@@ -18833,7 +18833,7 @@ virDomainResctrlVcpuMatch(virDomainDefPtr def,
* Just updating memory allocation information of that group
*/
if (virBitmapEqual(def->resctrls[i]->vcpus, vcpus)) {
*alloc = def->resctrls[i]->alloc;
*alloc = virObjectRef(def->resctrls[i]->alloc);
break;
}
if (virBitmapOverlaps(def->resctrls[i]->vcpus, vcpus)) {
......@@ -19219,8 +19219,6 @@ virDomainMemorytuneDefParse(virDomainDefPtr def,
if (!alloc)
goto cleanup;
new_alloc = true;
} else {
alloc = virObjectRef(alloc);
}
for (i = 0; i < n; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册