mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
FS: Add a check for a NULL pathname.
This commit is contained in:
@@ -77,7 +77,7 @@ FAR struct inode *inode_find(FAR const char *path, FAR const char **relpath)
|
|||||||
{
|
{
|
||||||
FAR struct inode *node;
|
FAR struct inode *node;
|
||||||
|
|
||||||
if (!*path || path[0] != '/')
|
if (!path || !*path || path[0] != '/')
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user