[libvirt PATCH 18/39] cpu_x86: Use g_auto* in x86EncodePolicy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 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





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux