diff options
author | kpayson64 <kpayson@google.com> | 2018-02-05 14:19:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 14:19:54 -0800 |
commit | 9e620c3d7f0d275041984081d244653fbbab6d6e (patch) | |
tree | 97fd87d211953331596d98e15f48e0bcf3149b62 /src/core/ext | |
parent | f6c5c38ec6e6b65438f0940f0ded52eb8794912e (diff) | |
parent | f069dd4498f92932dd458d16e2dcc7632d10cb70 (diff) |
Merge pull request #14315 from kpayson64/fix_refcounting
Fixes refcounting issue
Diffstat (limited to 'src/core/ext')
-rw-r--r-- | src/core/ext/filters/client_channel/client_channel.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 428945d5ad..25ef3be3be 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -1095,6 +1095,7 @@ static void pick_callback_done_locked(void* arg, grpc_error* error) { chand, calld); } async_pick_done_locked(elem, GRPC_ERROR_REF(error)); + GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback"); } // Takes a ref to chand->lb_policy and calls grpc_lb_policy_pick_locked(). @@ -1134,6 +1135,7 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { GRPC_CLOSURE_INIT(&calld->lb_pick_closure, pick_callback_done_locked, elem, grpc_combiner_scheduler(chand->combiner)); calld->pick.on_complete = &calld->lb_pick_closure; + GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback"); const bool pick_done = grpc_lb_policy_pick_locked(chand->lb_policy, &calld->pick); if (pick_done) { @@ -1142,6 +1144,7 @@ static bool pick_callback_start_locked(grpc_call_element* elem) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: pick completed synchronously", chand, calld); } + GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback"); } else { GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback_cancel"); grpc_call_combiner_set_notify_on_cancel( |