git: f370bf9fafce - main - inotify: Ensure that "allocfail" is initialized in inotify_log_one()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Jul 2026 13:41:49 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=f370bf9fafce82851bedb2b88bc21ec6ca0182df
commit f370bf9fafce82851bedb2b88bc21ec6ca0182df
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-07-08 19:28:43 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-07-09 13:41:27 +0000
inotify: Ensure that "allocfail" is initialized in inotify_log_one()
Fixes: b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs")
---
sys/kern/vfs_inotify.c | 3 +--
1 file changed, 1 insertion(+), 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;