aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-03 08:05:51 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-03 08:05:51 -0700
commitda11694971f12ee973e84c9386494a161228e51a (patch)
tree8c5673f19175cafa50a5c65cb2b9f37d69f70788 /src/core
parent7ae5a38ec024e1ff68771e266d8e163f0c23bfa8 (diff)
Fix TSAN reported errors
Diffstat (limited to 'src/core')
-rw-r--r--src/core/security/server_secure_chttp2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/security/server_secure_chttp2.c b/src/core/security/server_secure_chttp2.c
index 10266c8088..b312bdd0b6 100644
--- a/src/core/security/server_secure_chttp2.c
+++ b/src/core/security/server_secure_chttp2.c
@@ -66,6 +66,10 @@ static void state_ref(grpc_server_secure_state *state) {
static void state_unref(grpc_server_secure_state *state) {
if (gpr_unref(&state->refcount)) {
+ /* ensure all threads have unlocked */
+ gpr_mu_lock(&state->mu);
+ gpr_mu_unlock(&state->mu);
+ /* clean up */
grpc_security_connector_unref(state->sc);
gpr_free(state);
}