diff --git a/nuttx/fs/inode/fs_inodefind.c b/nuttx/fs/inode/fs_inodefind.c index f474d556f..3ca898fd7 100644 --- a/nuttx/fs/inode/fs_inodefind.c +++ b/nuttx/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; }