mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
cpu_x86: Use g_auto* in x86EncodePolicy
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9bb9cbf676
commit
5b45d2cf1f
@ -2164,7 +2164,7 @@ x86EncodePolicy(virCPUx86Data *data,
|
||||
virCPUx86MapPtr map,
|
||||
virCPUFeaturePolicy policy)
|
||||
{
|
||||
virCPUx86ModelPtr model;
|
||||
g_autoptr(virCPUx86Model) model = NULL;
|
||||
|
||||
if (!(model = x86ModelFromCPU(cpu, map, policy)))
|
||||
return -1;
|
||||
@ -2172,7 +2172,6 @@ x86EncodePolicy(virCPUx86Data *data,
|
||||
*data = model->data;
|
||||
model->data.len = 0;
|
||||
model->data.items = NULL;
|
||||
x86ModelFree(model);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user