hyperv: use g_autoptr for Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor in hypervDomainGetVcpus

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Matt Coleman 2021-01-21 13:51:26 -05:00 committed by Laine Stump
parent 7ddeafe083
commit 00beda0ee2

View File

@ -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;
}