Signed-off-by: Matt Coleman <matt(a)datto.com>
---
src/hyperv/hyperv_driver.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
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
--
2.30.0