[libvirt] [go PATCH 37/37] connect: add missing references on domain object in stats records

Daniel P. Berrangé berrange at redhat.com
Mon Jul 16 13:24:23 UTC 2018


Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 connect.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/connect.go b/connect.go
index 34a96ed..8cc7cc7 100644
--- a/connect.go
+++ b/connect.go
@@ -2915,6 +2915,10 @@ func (c *Connect) GetAllDomainStats(doms []*Domain, statsTypes DomainStatsTypes,
 		stats[i] = domstats
 	}
 
+	for i := 0; i < len(stats); i++ {
+		C.virDomainRef(stats[i].Domain.ptr)
+	}
+
 	return stats, nil
 }
 
-- 
2.17.1




More information about the libvir-list mailing list