Fix TSAN reported errors

pull/1888/head
Craig Tiller 10 years ago
parent 7ae5a38ec0
commit da11694971
  1. 4
      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) { static void state_unref(grpc_server_secure_state *state) {
if (gpr_unref(&state->refcount)) { 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); grpc_security_connector_unref(state->sc);
gpr_free(state); gpr_free(state);
} }

Loading…
Cancel
Save