qemu: remove unnecessary virQEMUCapsFreeHostCPUModel

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

This reverts commits:
commit d0498881a0
  virQEMUCapsFreeHostCPUModel: Don't always free host cpuData
commit 5276ec712a
  testUpdateQEMUCaps: Don't leak host cpuData

Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2018-09-09 00:40:30 +02:00
parent 4ed727a015
commit 51c02bd4f9
3 changed files with 3 additions and 34 deletions

View File

@ -1525,20 +1525,13 @@ virQEMUCapsHostCPUDataCopy(virQEMUCapsHostCPUDataPtr dst,
}
static void
virQEMUCapsHostCPUDataClearModels(virQEMUCapsHostCPUDataPtr cpuData)
{
virCPUDefFree(cpuData->reported);
virCPUDefFree(cpuData->migratable);
virCPUDefFree(cpuData->full);
}
static void
virQEMUCapsHostCPUDataClear(virQEMUCapsHostCPUDataPtr cpuData)
{
qemuMonitorCPUModelInfoFree(cpuData->info);
virQEMUCapsHostCPUDataClearModels(cpuData);
virCPUDefFree(cpuData->reported);
virCPUDefFree(cpuData->migratable);
virCPUDefFree(cpuData->full);
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,

View File

@ -56,11 +56,6 @@ void
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
virArch arch);
void
virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
virDomainVirtType type);
void
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,

View File

@ -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,