diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 52937c923931..190480095d4a 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1714,6 +1714,9 @@ vfs_getopt(opts, name, buf, len) { struct vfsopt *opt; + KASSERT(opts != NULL, + ("vfs_getopt: caller passed 'opts' as NULL\n")); + TAILQ_FOREACH(opt, opts, link) { if (strcmp(name, opt->name) == 0) { if (len != NULL) @@ -1743,6 +1746,9 @@ vfs_copyopt(opts, name, dest, len) { struct vfsopt *opt; + KASSERT(opts != NULL, + ("vfs_copyopt: caller passed 'opts' as NULL\n")); + TAILQ_FOREACH(opt, opts, link) { if (strcmp(name, opt->name) == 0) { if (len != opt->len)