提交 51c02bd4 编写于 作者: J Ján Tomko

qemu: remove unnecessary virQEMUCapsFreeHostCPUModel

After removing the host CPU model re-computation,
this function is no longer necessary.

This reverts commits:
commit d0498881
  virQEMUCapsFreeHostCPUModel: Don't always free host cpuData
commit 5276ec71
  testUpdateQEMUCaps: Don't leak host cpuData
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 4ed727a0
......@@ -1526,19 +1526,12 @@ virQEMUCapsHostCPUDataCopy(virQEMUCapsHostCPUDataPtr dst,
static void
virQEMUCapsHostCPUDataClearModels(virQEMUCapsHostCPUDataPtr cpuData)
virQEMUCapsHostCPUDataClear(virQEMUCapsHostCPUDataPtr cpuData)
{
qemuMonitorCPUModelInfoFree(cpuData->info);
virCPUDefFree(cpuData->reported);
virCPUDefFree(cpuData->migratable);
virCPUDefFree(cpuData->full);
}
static void
virQEMUCapsHostCPUDataClear(virQEMUCapsHostCPUDataPtr cpuData)
{
qemuMonitorCPUModelInfoFree(cpuData->info);
virQEMUCapsHostCPUDataClearModels(cpuData);
memset(cpuData, 0, sizeof(*cpuData));
}
......@@ -2981,20 +2974,6 @@ virQEMUCapsNewHostCPUModel(void)
}
void
virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
virDomainVirtType type)
{
virQEMUCapsHostCPUDataPtr cpuData = virQEMUCapsGetHostCPUData(qemuCaps, type);
if (!virQEMUCapsGuestIsNative(hostArch, qemuCaps->arch))
return;
virQEMUCapsHostCPUDataClearModels(cpuData);
}
void
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
......
......@@ -56,11 +56,6 @@ void
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
virArch arch);
void
virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
virDomainVirtType type);
void
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
......
......@@ -418,11 +418,6 @@ testUpdateQEMUCaps(const struct testInfo *info,
!!(info->flags & FLAG_SKIP_LEGACY_CPUS)) < 0)
goto cleanup;
virQEMUCapsFreeHostCPUModel(info->qemuCaps, caps->host.arch,
VIR_DOMAIN_VIRT_KVM);
virQEMUCapsFreeHostCPUModel(info->qemuCaps, caps->host.arch,
VIR_DOMAIN_VIRT_QEMU);
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps->host.arch,
VIR_DOMAIN_VIRT_KVM);
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps->host.arch,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册