diff options
author | Craig Tiller <ctiller@google.com> | 2015-06-03 08:05:51 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-06-03 08:05:51 -0700 |
commit | da11694971f12ee973e84c9386494a161228e51a (patch) | |
tree | 8c5673f19175cafa50a5c65cb2b9f37d69f70788 /src | |
parent | 7ae5a38ec024e1ff68771e266d8e163f0c23bfa8 (diff) |
Fix TSAN reported errors
Diffstat (limited to 'src')
-rw-r--r-- | src/core/security/server_secure_chttp2.c | 4 |
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); } |