git: d0aec16d99af - stable/14 - inotify: Ensure that "allocfail" is initialized in inotify_log_one()

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a7353e3.46653.c7e2082__40727.2546480939$1785943322$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0aec16d99af0805b882ba174946996a63869309

commit d0aec16d99af0805b882ba174946996a63869309
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-08 19:28:43 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-08-05 15:15:16 +0000

    inotify: Ensure that "allocfail" is initialized in inotify_log_one()
    
    Fixes:  b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs")
    (cherry picked from commit f370bf9fafce82851bedb2b88bc21ec6ca0182df)
---
 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 b44989bf5583..a9bb110b37dc 100644
--- a/sys/kern/vfs_inotify.c
+++ b/sys/kern/vfs_inotify.c
@@ -623,14 +623,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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.