Fix segfault on `mount -t nfs' reported by Gratien D'haese.

This commit is contained in:
Matt Kraai 2001-04-17 04:22:22 +00:00
parent 1c0d311ff4
commit 3d406da0c9
2 changed files with 6 additions and 0 deletions

View File

@ -405,6 +405,9 @@ extern int mount_main(int argc, char **argv)
argv++;
}
if (device == NULL && directory == NULL)
goto goodbye;
if (all == TRUE || directory == NULL) {
struct mntent *m;
FILE *f = setmntent("/etc/fstab", "r");

View File

@ -405,6 +405,9 @@ extern int mount_main(int argc, char **argv)
argv++;
}
if (device == NULL && directory == NULL)
goto goodbye;
if (all == TRUE || directory == NULL) {
struct mntent *m;
FILE *f = setmntent("/etc/fstab", "r");