The branch stable/15 has been updated by markj:

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

commit 1ad156fc14391fbca3c60012c4aaae6d3ad43c73
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-08 19:28:43 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-07-09 15:59:19 +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 9269dc0723af..f69a14780107 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;

Reply via email to