From 1901254b84d7701dec18fd27b104fd07a961fde1 Mon Sep 17 00:00:00 2001 From: Peter Gonda <pgonda@users.noreply.github.com> Date: Mon, 31 Jul 2017 08:57:04 -0700 Subject: [PATCH] Update tcp_server_utils_posix_common with GPR_ONCE_INIT Never initializing s_init_max_accept_queue_size could lead to undefined behavior. --- src/core/lib/iomgr/tcp_server_utils_posix_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.c b/src/core/lib/iomgr/tcp_server_utils_posix_common.c index dbb43186bd..ad535bc43e 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.c +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.c @@ -39,7 +39,7 @@ #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 -static gpr_once s_init_max_accept_queue_size; +static gpr_once s_init_max_accept_queue_size = GPR_ONCE_INIT; static int s_max_accept_queue_size; /* get max listen queue size on linux */ -- GitLab