mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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 count = 0;
|
||||||
int vcpu_number;
|
int vcpu_number;
|
||||||
hypervPrivate *priv = domain->conn->privateData;
|
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 */
|
/* Hyper-V does not allow setting CPU affinity: all cores will be used */
|
||||||
if (cpumaps && maplen > 0)
|
if (cpumaps && maplen > 0)
|
||||||
@ -2110,8 +2110,6 @@ hypervDomainGetVcpus(virDomainPtr domain,
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
hypervFreeObject((hypervObject *)vproc);
|
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user