Skip to content
Snippets Groups Projects
Commit 73c33541 authored by Robbie Shade's avatar Robbie Shade Committed by GitHub
Browse files

Merge pull request #10015 from rjshade/use_after_free

Fix flaky use-after-free in udp_server
parents 1462063d 9cf08b6b
No related branches found
No related tags found
No related merge requests found
......@@ -485,7 +485,11 @@ void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *s,
grpc_schedule_on_exec_ctx);
grpc_fd_notify_on_write(exec_ctx, sp->emfd, &sp->write_closure);
s->active_ports++;
/* Registered for both read and write callbacks: increment active_ports
* twice to account for this, and delay free-ing of memory until both
* on_read and on_write have fired. */
s->active_ports += 2;
sp = sp->next;
}
......
Subproject commit 30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e
Subproject commit f8a0efe03aa69b3336d8e228b37d4ccb17324b88
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment