fsnotify:fix bug when path="/"
fix crash when queue event to root dir's parent Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
parent
3ced80c743
commit
a40a8e17fb
@ -795,7 +795,7 @@ static void inotify_queue_parent_event(FAR char *path, uint32_t mask,
|
||||
FAR char *name;
|
||||
|
||||
name = basename(path);
|
||||
if (name == NULL)
|
||||
if (name == NULL || (strcmp(path, "/") == 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user