mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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:
parent
7ddeafe083
commit
00beda0ee2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user