aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-06-29 14:40:39 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-06-29 14:40:39 -0700
commit375109d30bc0dce4e7149df42cfe706e61993b92 (patch)
treeda280b23b76450b0a62e8ea0e574aab0f47bd272 /src
parentd1ec258331f070d0c1f3acc0d1a6afbe769fcbde (diff)
parentafa864244d921626480abc6e4408a2aa183396c3 (diff)
Merge branch 'filter_call_init_failure' into filter_api
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/client_config/subchannel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c
index 8a1ac68c6e..495ca46cc8 100644
--- a/src/core/ext/client_config/subchannel.c
+++ b/src/core/ext/client_config/subchannel.c
@@ -706,8 +706,7 @@ grpc_error *grpc_connected_subchannel_create_call(
grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con);
*call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
- (*call)->connection = con;
- GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
+ (*call)->connection = con; // Ref is added below.
grpc_error *error =
grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call,
NULL, NULL, callstk);
@@ -715,8 +714,10 @@ grpc_error *grpc_connected_subchannel_create_call(
const char *error_string = grpc_error_string(error);
gpr_log(GPR_ERROR, "error: %s", error_string);
grpc_error_free_string(error_string);
+ gpr_free(*call);
return error;
}
+ GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollent);
return GRPC_ERROR_NONE;
}