aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2018-02-21 10:49:00 -0800
committerGravatar GitHub <noreply@github.com>2018-02-21 10:49:00 -0800
commit39d5121cb7d4dc03d04c3ac91d93688b4e824282 (patch)
treee1052b4c8fe2a612585b08621482a5c858a41313 /src/core
parent5262c087d88123c0f69603f42b6401a4b8fa9282 (diff)
parent3ef4af2eae875abc0305ddfc553946d4f4c686b1 (diff)
Merge pull request #14473 from markdroth/lb_policy_crash
Fix crash when failing to create an LB policy.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/filters/client_channel/client_channel.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index 174a15b447..9a8f25b630 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -446,7 +446,6 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) {
chand->lb_policy->UpdateLocked(*chand->resolver_result);
} else {
// Instantiate new LB policy.
- lb_policy_created = true;
grpc_core::LoadBalancingPolicy::Args lb_policy_args;
lb_policy_args.combiner = chand->combiner;
lb_policy_args.client_channel_factory = chand->client_channel_factory;
@@ -458,6 +457,7 @@ static void on_resolver_result_changed_locked(void* arg, grpc_error* error) {
gpr_log(GPR_ERROR, "could not create LB policy \"%s\"",
lb_policy_name);
} else {
+ lb_policy_created = true;
reresolution_request_args* args =
static_cast<reresolution_request_args*>(
gpr_zalloc(sizeof(*args)));