fix segv on error
This commit is contained in:
parent
4b0671205d
commit
27da84622a
|
@ -78,11 +78,10 @@ func (s *systemPS) DiskUsage() ([]*disk.DiskUsageStat, error) {
|
||||||
|
|
||||||
for _, p := range parts {
|
for _, p := range parts {
|
||||||
du, err := disk.DiskUsage(p.Mountpoint)
|
du, err := disk.DiskUsage(p.Mountpoint)
|
||||||
du.Fstype = p.Fstype
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
du.Fstype = p.Fstype
|
||||||
usage = append(usage, du)
|
usage = append(usage, du)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue