fix segv on error
This commit is contained in:
parent
4b0671205d
commit
601b444a60
|
@ -8,6 +8,7 @@
|
|||
### Bugfixes
|
||||
[#113](https://github.com/influxdb/telegraf/issues/113): Update README with Telegraf/InfluxDB compatibility
|
||||
[#118](https://github.com/influxdb/telegraf/pull/118): Fix for disk usage stats in Windows. Thanks @srfraser!
|
||||
[#122](https://github.com/influxdb/telegraf/issues/122): Fix for DiskUsage segv fault. Thanks @srfraser!
|
||||
|
||||
## v0.1.5 [2015-08-13]
|
||||
|
||||
|
|
|
@ -78,11 +78,10 @@ func (s *systemPS) DiskUsage() ([]*disk.DiskUsageStat, error) {
|
|||
|
||||
for _, p := range parts {
|
||||
du, err := disk.DiskUsage(p.Mountpoint)
|
||||
du.Fstype = p.Fstype
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
du.Fstype = p.Fstype
|
||||
usage = append(usage, du)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue