diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-07-08 19:28:43 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-07-09 13:41:27 +0000 |
| commit | f370bf9fafce82851bedb2b88bc21ec6ca0182df (patch) | |
| tree | 7650b5cf7f8cfe6176913faebca578bc71de9441 | |
| parent | 3e123be2305a30369f63bcee22ca5e0db527f320 (diff) | |
inotify: Ensure that "allocfail" is initialized in inotify_log_one()
Fixes: b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs")
| -rw-r--r-- | sys/kern/vfs_inotify.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index 473ce9358276..bc8db76d848b 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -627,14 +627,13 @@ inotify_log_one(struct inotify_watch *watch, const char *name, size_t namelen, if (!notify && !delete && !unmount) return; + allocfail = false; if (notify || unmount) { rec = inotify_alloc_record(watch->wd, name, namelen, event, cookie, M_NOWAIT); if (rec == NULL) { rec = &sc->overflow; allocfail = true; - } else { - allocfail = false; } } else { rec = NULL; |
