From 68038211c18e30397f6b53c626a66ee6c2ace95f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 13 Dec 2014 13:05:54 -0600 Subject: [PATCH] FS: Add a check for a NULL pathname. --- fs/inode/fs_inodefind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/inode/fs_inodefind.c b/fs/inode/fs_inodefind.c index f474d556f17..3ca898fd769 100644 --- a/fs/inode/fs_inodefind.c +++ b/fs/inode/fs_inodefind.c @@ -77,7 +77,7 @@ FAR struct inode *inode_find(FAR const char *path, FAR const char **relpath) { FAR struct inode *node; - if (!*path || path[0] != '/') + if (!path || !*path || path[0] != '/') { return NULL; }