|
|
b971b8 |
From b91ae8a08c0906011e9ff2ed4f8c8fce908603b5 Mon Sep 17 00:00:00 2001
|
|
|
b971b8 |
Message-Id: <b91ae8a08c0906011e9ff2ed4f8c8fce908603b5@dist-git>
|
|
|
b971b8 |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
b971b8 |
Date: Tue, 26 May 2020 10:59:16 +0200
|
|
|
b971b8 |
Subject: [PATCH] cpu_x86: Use g_auto* in x86EncodePolicy
|
|
|
b971b8 |
MIME-Version: 1.0
|
|
|
b971b8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b971b8 |
Content-Transfer-Encoding: 8bit
|
|
|
b971b8 |
|
|
|
b971b8 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
b971b8 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
b971b8 |
(cherry picked from commit 5b45d2cf1ff0d2d972f103a678c01bc0eb7c1e18)
|
|
|
b971b8 |
|
|
|
b971b8 |
https://bugzilla.redhat.com/show_bug.cgi?id=1840010
|
|
|
b971b8 |
|
|
|
b971b8 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
b971b8 |
Message-Id: <cf057cf29d8f8f2369eab3afb5202a6466c0dc2e.1590483392.git.jdenemar@redhat.com>
|
|
|
b971b8 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
b971b8 |
---
|
|
|
b971b8 |
src/cpu/cpu_x86.c | 3 +--
|
|
|
b971b8 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
b971b8 |
|
|
|
b971b8 |
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
|
|
b971b8 |
index dba4165527..fd410aeafb 100644
|
|
|
b971b8 |
--- a/src/cpu/cpu_x86.c
|
|
|
b971b8 |
+++ b/src/cpu/cpu_x86.c
|
|
|
b971b8 |
@@ -2164,7 +2164,7 @@ x86EncodePolicy(virCPUx86Data *data,
|
|
|
b971b8 |
virCPUx86MapPtr map,
|
|
|
b971b8 |
virCPUFeaturePolicy policy)
|
|
|
b971b8 |
{
|
|
|
b971b8 |
- virCPUx86ModelPtr model;
|
|
|
b971b8 |
+ g_autoptr(virCPUx86Model) model = NULL;
|
|
|
b971b8 |
|
|
|
b971b8 |
if (!(model = x86ModelFromCPU(cpu, map, policy)))
|
|
|
b971b8 |
return -1;
|
|
|
b971b8 |
@@ -2172,7 +2172,6 @@ x86EncodePolicy(virCPUx86Data *data,
|
|
|
b971b8 |
*data = model->data;
|
|
|
b971b8 |
model->data.len = 0;
|
|
|
b971b8 |
model->data.items = NULL;
|
|
|
b971b8 |
- x86ModelFree(model);
|
|
|
b971b8 |
|
|
|
b971b8 |
return 0;
|
|
|
b971b8 |
}
|
|
|
b971b8 |
--
|
|
|
b971b8 |
2.26.2
|
|
|
b971b8 |
|