Free domains
Change-Id: Ide1743bbae89f41d2d6f62195ba4f7347d43cfda
This commit is contained in:
parent
5f09608a4a
commit
6aefcf98c1
@ -340,6 +340,15 @@ func (c *DomainStatsCollector) Collect(ch chan<- prometheus.Metric) {
|
||||
0,
|
||||
)
|
||||
|
||||
defer func(stats []libvirt.DomainStats) {
|
||||
for _, stat := range stats {
|
||||
err := stat.Domain.Free()
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
}
|
||||
}
|
||||
}(stats)
|
||||
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user