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:
Matt Coleman 2021-01-21 13:51:11 -05:00 committed by Laine Stump
parent 917ed7592a
commit 81c9102256

View File

@ -2253,7 +2253,7 @@ hypervConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxn
{
bool success = false;
hypervPrivate *priv = conn->privateData;
Msvm_ComputerSystem *computerSystemList = NULL;
g_autoptr(Msvm_ComputerSystem) computerSystemList = NULL;
Msvm_ComputerSystem *computerSystem = NULL;
int count = 0;
size_t i;
@ -2284,8 +2284,6 @@ hypervConnectListDefinedDomains(virConnectPtr conn, char **const names, int maxn
count = -1;
}
hypervFreeObject((hypervObject *)computerSystemList);
return count;
}