mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
Make ``df -l'' work when no network filesystems are loaded.
PR: bin/32397
This commit is contained in:
parent
a9c9684163
commit
cf5b29e126
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88182
@ -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