diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 9dac476c4c67..e9c313d18aeb 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -91,7 +91,7 @@ fixfsfile() struct stat sb; struct statfs sf; - if (strcmp(_fs_fstab.fs_file, "/") != 0) + if (_fs_fstab.fs_file != NULL &&strcmp(_fs_fstab.fs_file, "/") != 0) return; if (statfs("/", &sf) != 0) return;