mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
cpu_x86: Use g_auto* in virCPUx86CopyMigratable
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ff6897c845
commit
a32a3e934f
@ -3109,7 +3109,7 @@ x86FeatureFilterMigratable(const char *name,
|
||||
static virCPUDefPtr
|
||||
virCPUx86CopyMigratable(virCPUDefPtr cpu)
|
||||
{
|
||||
virCPUDefPtr copy;
|
||||
g_autoptr(virCPUDef) copy = NULL;
|
||||
virCPUx86MapPtr map;
|
||||
|
||||
if (!(map = virCPUx86GetMap()))
|
||||
@ -3120,13 +3120,9 @@ virCPUx86CopyMigratable(virCPUDefPtr cpu)
|
||||
|
||||
if (virCPUDefCopyModelFilter(copy, cpu, false,
|
||||
x86FeatureFilterMigratable, map) < 0)
|
||||
goto error;
|
||||
return NULL;
|
||||
|
||||
return copy;
|
||||
|
||||
error:
|
||||
virCPUDefFree(copy);
|
||||
return NULL;
|
||||
return g_steal_pointer(©);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user