aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2017-03-07 14:11:01 -0800
committerGravatar GitHub <noreply@github.com>2017-03-07 14:11:01 -0800
commit41559c643416148f46251052f8148bc38071a47f (patch)
treeeca277745dd3497b5ef0920cb332d43bb2dd779e /src/core
parent73c33541b5eaf6a44e0e14e1382ab19f25538873 (diff)
parent7c1aafb3f9dbc284f2041773002379c9def00f72 (diff)
Merge pull request #10024 from grpc/revert-10015-use_after_free
Revert "Fix flaky use-after-free in udp_server"
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lib/iomgr/udp_server.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c
index d1bcd89af1..2a1c8d39fa 100644
--- a/src/core/lib/iomgr/udp_server.c
+++ b/src/core/lib/iomgr/udp_server.c
@@ -485,11 +485,7 @@ 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);
- /* 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;
-
+ s->active_ports++;
sp = sp->next;
}