fix segv on error

This commit is contained in:
Simon Fraser 2015-08-20 09:40:32 +01:00 committed by Simon Fraser
parent 4b0671205d
commit 27da84622a
1 changed files with 1 additions and 2 deletions

View File

@ -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)
}