From: Matt Coleman Date: Thu, 21 Jan 2021 18:51:11 +0000 (-0500) Subject: hyperv: use g_autoptr for Msvm_ComputerSystem in hypervConnectListDefinedDomains X-Git-Tag: v7.1.0-rc1~470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81c9102256d09790ae371a163a1715aac1afb863;p=thirdparty%2Flibvirt.git hyperv: use g_autoptr for Msvm_ComputerSystem in hypervConnectListDefinedDomains Signed-off-by: Matt Coleman Reviewed-by: Laine Stump --- diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 0642e42b35..f1e6efd343 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -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; }