diff options
author | Craig Tiller <ctiller@google.com> | 2015-07-06 08:02:41 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-07-06 08:02:41 -0700 |
commit | a82fef14b3caa94c133e9c49504243e28ea2cadd (patch) | |
tree | 9989b85038420670c2cbd9c566c29840b51f3e5f /src/core | |
parent | bdfd8976e14282977483b24826b171a22582cbb1 (diff) |
Fix bad assert, memory leak
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/client_config/lb_policies/pick_first.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 3d57e3136a..73da624aff 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -155,8 +155,6 @@ loop: switch (p->checking_connectivity) { case GRPC_CHANNEL_READY: p->selected = p->subchannels[p->checking_subchannel]; - GPR_ASSERT(grpc_subchannel_check_connectivity(p->selected) == - GRPC_CHANNEL_READY); while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = p->selected; @@ -185,6 +183,7 @@ loop: GPR_SWAP(grpc_subchannel *, p->subchannels[p->checking_subchannel], p->subchannels[p->num_subchannels - 1]); p->num_subchannels--; + GRPC_SUBCHANNEL_UNREF(p->subchannels[p->num_subchannels], "pick_first"); if (p->num_subchannels == 0) { while ((pp = p->pending_picks)) { p->pending_picks = pp->next; @@ -197,7 +196,6 @@ loop: p->checking_subchannel %= p->num_subchannels; p->checking_connectivity = grpc_subchannel_check_connectivity( p->subchannels[p->checking_subchannel]); - GRPC_SUBCHANNEL_UNREF(p->subchannels[p->num_subchannels], "pick_first"); add_interested_parties_locked(p); goto loop; } |