From: Matt Coleman Date: Thu, 21 Jan 2021 18:51:21 +0000 (-0500) Subject: hyperv: use g_autoptr for Msvm_ComputerSystem in hypervConnectListAllDomains X-Git-Tag: v7.1.0-rc1~460 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9c015ec2c43e273f2827c8b3febf46c092cb3d2;p=thirdparty%2Flibvirt.git hyperv: use g_autoptr for Msvm_ComputerSystem in hypervConnectListAllDomains Signed-off-by: Matt Coleman Reviewed-by: Laine Stump --- diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index f134b7f137..2dfccb4802 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -2869,7 +2869,7 @@ hypervConnectListAllDomains(virConnectPtr conn, { hypervPrivate *priv = conn->privateData; g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; - Msvm_ComputerSystem *computerSystemList = NULL; + g_autoptr(Msvm_ComputerSystem) computerSystemList = NULL; Msvm_ComputerSystem *computerSystem = NULL; size_t ndoms; virDomainPtr domain; @@ -2981,8 +2981,6 @@ hypervConnectListAllDomains(virConnectPtr conn, VIR_FREE(doms); } - hypervFreeObject((hypervObject *)computerSystemList); - return ret; } #undef MATCH