The branch main has been updated by kib:

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

commit c0c7b56d3039a75a01315d610e386a5e9eda704c
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-09-04 14:40:50 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-09-04 14:44:07 +0000

    ntsync(4): do not double-free the alert event when a dup was detected for 
WAIT_ALL
    
    Reported by:    Andrew Griffiths <[email protected]>
    Reported by:    Chris Jarrett-Davies <[email protected]>
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/ntsync/ntsync.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/ntsync/ntsync.c b/sys/dev/ntsync/ntsync.c
index 2dec2f68aa80..c1c3ab6a3d6c 100644
--- a/sys/dev/ntsync/ntsync.c
+++ b/sys/dev/ntsync/ntsync.c
@@ -1263,6 +1263,8 @@ ntsync_wait_state_get(struct ntsync_wait_args *nwa, 
u_long cmd,
                        for (j = i + 1; j < state->obj_count; j++) {
                                if (obj == state->objs[j]) {
                                        i = state->obj_count;
+                                       if (state->alert_event != NULL)
+                                               i--;
                                        error = EINVAL;
                                        goto error_out;
                                }

Reply via email to