mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
cpu: Use g_auto* in virCPUCompareXML
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e8d40cc3be
commit
ca1c9716cc
@ -111,21 +111,15 @@ virCPUCompareXML(virArch arch,
|
||||
const char *xml,
|
||||
bool failIncompatible)
|
||||
{
|
||||
virCPUDefPtr cpu = NULL;
|
||||
virCPUCompareResult ret = VIR_CPU_COMPARE_ERROR;
|
||||
g_autoptr(virCPUDef) cpu = NULL;
|
||||
|
||||
VIR_DEBUG("arch=%s, host=%p, xml=%s",
|
||||
virArchToString(arch), host, NULLSTR(xml));
|
||||
|
||||
if (virCPUDefParseXMLString(xml, VIR_CPU_TYPE_AUTO, &cpu) < 0)
|
||||
goto cleanup;
|
||||
return VIR_CPU_COMPARE_ERROR;
|
||||
|
||||
ret = virCPUCompare(arch, host, cpu, failIncompatible);
|
||||
|
||||
cleanup:
|
||||
virCPUDefFree(cpu);
|
||||
|
||||
return ret;
|
||||
return virCPUCompare(arch, host, cpu, failIncompatible);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user