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
This commit is contained in:
Konstantin Belousov committed 2026-09-04 17:44:07 +03:00
1 parent cd575d557b
commit c0c7b56d30
1 file changed
+2
+2
View File
@@ -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;
}