mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:26:54 +08: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:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user