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
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@
- [#3729](https://github.com/influxdata/telegraf/issues/3729): Set path to / if HOST_MOUNT_PREFIX matches full path. - [#3729](https://github.com/influxdata/telegraf/issues/3729): Set path to / if HOST_MOUNT_PREFIX matches full path.
- [#3739](https://github.com/influxdata/telegraf/issues/3739): Remove userinfo from url tag in prometheus input. - [#3739](https://github.com/influxdata/telegraf/issues/3739): Remove userinfo from url tag in prometheus input.
- [#3778](https://github.com/influxdata/telegraf/issues/3778): Fix ping plugin not reporting zero durations. - [#3778](https://github.com/influxdata/telegraf/issues/3778): Fix ping plugin not reporting zero durations.
- [#3807](https://github.com/influxdata/telegraf/issues/3807): Fix memory leak in postgresql_extensible.
## v1.5.2 [2018-01-30] ## v1.5.2 [2018-01-30]

View File

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