Fix memory leak in postgresql_extensible

This commit is contained in:
Daniel Nelson
2018-02-20 11:58:43 -08:00
parent 770cf4e0b6
commit d8dae1b1ab
2 changed files with 3 additions and 0 deletions

View File

@@ -127,6 +127,8 @@ func (p *Postgresql) Gather(acc telegraf.Accumulator) error {
meas_name string
)
p.AllColumns = nil
if p.Address == "" || p.Address == "localhost" {
p.Address = localhost
}