summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/mount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 7dd7039..b76c38a 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -886,8 +886,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
nfsvers = 0;
/* parse options */
-
- for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
+ if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
char *opteq = strchr(opt, '=');
if (opteq) {
static const char *const options[] = {