This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a40a8e17fb398f2b34607b5e7c53acd199b77f71 Author: guohao15 <[email protected]> AuthorDate: Thu Nov 2 20:20:24 2023 +0800 fsnotify:fix bug when path="/" fix crash when queue event to root dir's parent Signed-off-by: guohao15 <[email protected]> --- fs/notify/inotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/notify/inotify.c b/fs/notify/inotify.c index dbfda950ed..16708ddef6 100644 --- a/fs/notify/inotify.c +++ b/fs/notify/inotify.c @@ -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; }
