mirror of
https://github.com/apache/nuttx.git
synced 2026-10-05 05:07:48 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue