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 {
|
||||
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