mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
hyperv: use g_autoptr for Msvm_ComputerSystem in hypervConnectListDefinedDomains
Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
917ed7592a
commit
81c9102256
@ -2253,7 +2253,7 @@ hypervConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxn
|
|||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
hypervPrivate *priv = conn->privateData;
|
hypervPrivate *priv = conn->privateData;
|
||||||
Msvm_ComputerSystem *computerSystemList = NULL;
|
g_autoptr(Msvm_ComputerSystem) computerSystemList = NULL;
|
||||||
Msvm_ComputerSystem *computerSystem = NULL;
|
Msvm_ComputerSystem *computerSystem = NULL;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -2284,8 +2284,6 @@ hypervConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxn
|
|||||||
count = -1;
|
count = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
hypervFreeObject((hypervObject *)computerSystemList);
|
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user