Skip to content
Snippets Groups Projects
Commit da116949 authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix TSAN reported errors

parent 7ae5a38e
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,10 @@ static void state_ref(grpc_server_secure_state *state) { ...@@ -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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment