aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Peter Gonda <pgonda@users.noreply.github.com>2017-07-31 08:57:04 -0700
committerGravatar GitHub <noreply@github.com>2017-07-31 08:57:04 -0700
commit1901254b84d7701dec18fd27b104fd07a961fde1 (patch)
tree132483be13128f6ef63b161b02aec221e240202d /src
parentf787594e688cb59fe207bb3199b9cb4cfa0c87ca (diff)
Update tcp_server_utils_posix_common with GPR_ONCE_INIT
Never initializing s_init_max_accept_queue_size could lead to undefined behavior.
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix_common.c2
1 files changed, 1 insertions, 1 deletions
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 */