aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/subchannel.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-04-05 09:56:12 -0700
committerGravatar Mark D. Roth <roth@google.com>2017-04-05 09:56:12 -0700
commit61a6398675ae3afd3ee305a4bba3c6c148939a05 (patch)
tree896d582c26324272573a183a6f58da75a1df0482 /src/core/ext/filters/client_channel/subchannel.c
parentb39bf85dfce99804a4e07991a36431696a43d10c (diff)
Fix refcounting for subchannel call stack init failures.
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel.c')
-rw-r--r--src/core/ext/filters/client_channel/subchannel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel.c b/src/core/ext/filters/client_channel/subchannel.c
index 29a1a09555..9a7a7a0ee5 100644
--- a/src/core/ext/filters/client_channel/subchannel.c
+++ b/src/core/ext/filters/client_channel/subchannel.c
@@ -769,7 +769,7 @@ grpc_error *grpc_connected_subchannel_create_call(
*call = gpr_arena_alloc(
args->arena, sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
- (*call)->connection = con; // Ref is added below.
+ (*call)->connection = GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
const grpc_call_element_args call_args = {.call_stack = callstk,
.server_transport_data = NULL,
.context = NULL,
@@ -784,7 +784,6 @@ grpc_error *grpc_connected_subchannel_create_call(
gpr_log(GPR_ERROR, "error: %s", error_string);
return error;
}
- GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, args->pollent);
return GRPC_ERROR_NONE;
}