Fix segfault on `mount -t nfs' reported by Gratien D'haese.
diff --git a/mount.c b/mount.c
index 5b6ec1e..d1568d8 100644
--- a/mount.c
+++ b/mount.c
@@ -405,6 +405,9 @@
 		argv++;
 	}
 
+	if (device == NULL && directory == NULL)
+		goto goodbye;
+
 	if (all == TRUE || directory == NULL) {
 		struct mntent *m;
 		FILE *f = setmntent("/etc/fstab", "r");
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 5b6ec1e..d1568d8 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -405,6 +405,9 @@
 		argv++;
 	}
 
+	if (device == NULL && directory == NULL)
+		goto goodbye;
+
 	if (all == TRUE || directory == NULL) {
 		struct mntent *m;
 		FILE *f = setmntent("/etc/fstab", "r");