aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2017-07-12 14:41:55 -0700
committerGravatar GitHub <noreply@github.com>2017-07-12 14:41:55 -0700
commit1bec15ee9ef622a440f7e7c658f94febc075f6ec (patch)
treed5157bf2957f2ea8426032ef1ba3b943c4c7b4b6 /src
parent4d39b4d7f30f2db67a03a45bf35851fa7bbb764d (diff)
parent1105354aa3b07b24285dc5e97fbe9bfec573fdec (diff)
Merge pull request #11777 from dgquintas/null_userdata_rr
NULL user_data after destruction
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
index 56d340b8c2..fbef79ec31 100644
--- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
+++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
@@ -158,6 +158,7 @@ static void rr_subchannel_list_destroy(grpc_exec_ctx *exec_ctx,
if (sd->user_data != NULL) {
GPR_ASSERT(sd->user_data_vtable != NULL);
sd->user_data_vtable->destroy(exec_ctx, sd->user_data);
+ sd->user_data = NULL;
}
}
gpr_free(subchannel_list->subchannels);
@@ -578,6 +579,7 @@ static void rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg,
if (sd->user_data != NULL) {
GPR_ASSERT(sd->user_data_vtable != NULL);
sd->user_data_vtable->destroy(exec_ctx, sd->user_data);
+ sd->user_data = NULL;
}
if (new_policy_connectivity_state == GRPC_CHANNEL_SHUTDOWN) {
/* the policy is shutting down. Flush all the pending picks... */