aboutsummaryrefslogtreecommitdiff
path: root/lib/getmountlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getmountlist.c')
-rw-r--r--lib/getmountlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getmountlist.c b/lib/getmountlist.c
index 30fb9a35..4fec41b7 100644
--- a/lib/getmountlist.c
+++ b/lib/getmountlist.c
@@ -78,7 +78,7 @@ int comma_scan(char *optlist, char *opt, int clean)
no = 2*(*s == 'n' && s[1] == 'o');
if (optlen == len-no && !strncmp(opt, s+no, optlen)) {
got = !no;
- if (clean) memmove(s, optlist, strlen(optlist)+1);
+ if (clean && optlist) memmove(s, optlist, strlen(optlist)+1);
}
}