diff options
author | Hope Casey-Allen <hcaseyal@google.com> | 2018-06-26 12:00:53 -0700 |
---|---|---|
committer | Hope Casey-Allen <hcaseyal@google.com> | 2018-07-03 10:00:12 -0700 |
commit | 71566ffa932b6941c700ffbd624eb64014639b30 (patch) | |
tree | db4d297a5e4f4d291061e8eae7236ecc53490fe8 /src/core/lib/security/transport | |
parent | e0198fce70c3f79475f63860af7c46840496765d (diff) |
Allocate on call arena in client_auth_filter
Diffstat (limited to 'src/core/lib/security/transport')
-rw-r--r-- | src/core/lib/security/transport/client_auth_filter.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index 048e390a71..9b5c6f3490 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -42,6 +42,7 @@ namespace { /* We can have a per-call credentials. */ struct call_data { + gpr_arena* arena; grpc_call_stack* owning_call; grpc_call_combiner* call_combiner; grpc_call_credentials* creds; @@ -276,10 +277,12 @@ static void auth_start_transport_stream_op_batch( channel_data* chand = static_cast<channel_data*>(elem->channel_data); if (!batch->cancel_stream) { + // TODO(hcaseyal): move this to init_call_elem once issue #15927 is + // resolved. GPR_ASSERT(batch->payload->context != nullptr); if (batch->payload->context[GRPC_CONTEXT_SECURITY].value == nullptr) { batch->payload->context[GRPC_CONTEXT_SECURITY].value = - grpc_client_security_context_create(); + grpc_client_security_context_create(calld->arena); batch->payload->context[GRPC_CONTEXT_SECURITY].destroy = grpc_client_security_context_destroy; } @@ -335,6 +338,7 @@ static void auth_start_transport_stream_op_batch( static grpc_error* init_call_elem(grpc_call_element* elem, const grpc_call_element_args* args) { call_data* calld = static_cast<call_data*>(elem->call_data); + calld->arena = args->arena; calld->owning_call = args->call_stack; calld->call_combiner = args->call_combiner; calld->host = grpc_empty_slice(); |