[PATCH 46/55] hyperv: use g_autoptr for Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor in hypervDomainGetVcpus

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

 



Signed-off-by: Matt Coleman <matt@xxxxxxxxx>
---
 src/hyperv/hyperv_driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 4bf91cfa1a..84ffb24f1a 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -2071,7 +2071,7 @@ hypervDomainGetVcpus(virDomainPtr domain,
     int count = 0;
     int vcpu_number;
     hypervPrivate *priv = domain->conn->privateData;
-    Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor *vproc = NULL;
+    g_autoptr(Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) vproc = NULL;
 
     /* Hyper-V does not allow setting CPU affinity: all cores will be used */
     if (cpumaps && maplen > 0)
@@ -2110,8 +2110,6 @@ hypervDomainGetVcpus(virDomainPtr domain,
         count++;
     }
 
-    hypervFreeObject((hypervObject *)vproc);
-
     return count;
 }
 
-- 
2.30.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