Fix segfault on `mount -t nfs' reported by Gratien D'haese.
This commit is contained in:
3
mount.c
3
mount.c
@ -405,6 +405,9 @@ extern int mount_main(int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (device == NULL && directory == NULL)
|
||||||
|
goto goodbye;
|
||||||
|
|
||||||
if (all == TRUE || directory == NULL) {
|
if (all == TRUE || directory == NULL) {
|
||||||
struct mntent *m;
|
struct mntent *m;
|
||||||
FILE *f = setmntent("/etc/fstab", "r");
|
FILE *f = setmntent("/etc/fstab", "r");
|
||||||
|
@ -405,6 +405,9 @@ extern int mount_main(int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (device == NULL && directory == NULL)
|
||||||
|
goto goodbye;
|
||||||
|
|
||||||
if (all == TRUE || directory == NULL) {
|
if (all == TRUE || directory == NULL) {
|
||||||
struct mntent *m;
|
struct mntent *m;
|
||||||
FILE *f = setmntent("/etc/fstab", "r");
|
FILE *f = setmntent("/etc/fstab", "r");
|
||||||
|
Reference in New Issue
Block a user