aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/http/client_authority_filter.cc
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@cs.toronto.edu>2018-10-15 16:15:33 -0400
committerGravatar GitHub <noreply@github.com>2018-10-15 16:15:33 -0400
commitfe431b4d8ad24c2fc9981f4b9fc28ab75020c410 (patch)
tree435c61abedfa5f5b24d40c0df74bbcd1c9881994 /src/core/ext/filters/http/client_authority_filter.cc
parent945b6dbf7b14dc849c4cf377f52d27e635a971aa (diff)
parent08ae060a445ae544eb58455e751eb2b77e70b65c (diff)
Merge pull request #16801 from soheilhy/worktree-slice
Avoid unnecessary ref/unref calls to get mdelem from slices.
Diffstat (limited to 'src/core/ext/filters/http/client_authority_filter.cc')
-rw-r--r--src/core/ext/filters/http/client_authority_filter.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/ext/filters/http/client_authority_filter.cc b/src/core/ext/filters/http/client_authority_filter.cc
index 1ca20ebb26..6383f12594 100644
--- a/src/core/ext/filters/http/client_authority_filter.cc
+++ b/src/core/ext/filters/http/client_authority_filter.cc
@@ -59,9 +59,8 @@ void authority_start_transport_stream_op_batch(
initial_metadata->idx.named.authority == nullptr) {
grpc_error* error = grpc_metadata_batch_add_head(
initial_metadata, &calld->authority_storage,
- grpc_mdelem_from_slices(
- GRPC_MDSTR_AUTHORITY,
- grpc_slice_ref_internal(chand->default_authority)));
+ grpc_mdelem_create(GRPC_MDSTR_AUTHORITY, chand->default_authority,
+ nullptr));
if (error != GRPC_ERROR_NONE) {
grpc_transport_stream_op_batch_finish_with_failure(batch, error,
calld->call_combiner);