summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index ec2373c97b..0bc9d200f4 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -177,6 +177,8 @@ struct dir *opendir(const char *pathname)
struct mtab_entry *e;
e = get_mtab_entry_by_path(pathname);
+ if (!e)
+ return NULL;
if (e != mtab)
pathname += strlen(e->path);
@@ -252,6 +254,8 @@ int mkdir (const char *pathname)
struct mtab_entry *e;
e = get_mtab_entry_by_path(pathname);
+ if (!e)
+ return NULL;
if (e != mtab)
pathname += strlen(e->path);