Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu/cpu_x86.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 26d872622e..ce43da2bfa 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -2168,7 +2168,7 @@ x86EncodePolicy(virCPUx86Data *data,
virCPUx86MapPtr map,
virCPUFeaturePolicy policy)
{
- virCPUx86ModelPtr model;
+ g_autoptr(virCPUx86Model) model = NULL;
if (!(model = x86ModelFromCPU(cpu, map, policy)))
return -1;
@@ -2176,7 +2176,6 @@ x86EncodePolicy(virCPUx86Data *data,
*data = model->data;
model->data.len = 0;
model->data.items = NULL;
- x86ModelFree(model);
return 0;
}
--
2.26.0