Make ``df -l'' work when no network filesystems are loaded.
PR: bin/32397
This commit is contained in:
parent
a9c9684163
commit
cf5b29e126
@ -548,8 +548,10 @@ makenetvfslist()
|
||||
}
|
||||
}
|
||||
|
||||
if ((str = malloc(sizeof(char) * (32 * cnt + cnt + 2))) == NULL) {
|
||||
warnx("malloc failed");
|
||||
if (cnt == 0 ||
|
||||
(str = malloc(sizeof(char) * (32 * cnt + cnt + 2))) == NULL) {
|
||||
if (cnt > 0)
|
||||
warnx("malloc failed");
|
||||
free(listptr);
|
||||
return (NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user