Stop using banned functions

pull/15384/head
ncteisen 7 years ago
parent bc20975f21
commit 98c1de07e6
  1. 7
      src/core/ext/filters/http/client_authority_filter.cc
  2. 2
      src/core/ext/transport/cronet/transport/cronet_transport.cc
  3. 2
      src/core/lib/iomgr/tcp_client_posix.cc
  4. 2
      src/core/lib/security/security_connector/alts_security_connector.cc
  5. 2
      src/core/lib/transport/byte_stream.cc

@ -59,8 +59,9 @@ 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(chand->default_authority)));
grpc_mdelem_from_slices(
GRPC_MDSTR_AUTHORITY,
grpc_slice_ref_internal(chand->default_authority)));
if (error != GRPC_ERROR_NONE) {
grpc_transport_stream_op_batch_finish_with_failure(batch, error,
calld->call_combiner);
@ -110,7 +111,7 @@ grpc_error* init_channel_elem(grpc_channel_element* elem,
/* Destructor for channel data */
void destroy_channel_elem(grpc_channel_element* elem) {
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
grpc_slice_unref(chand->default_authority);
grpc_slice_unref_internal(chand->default_authority);
}
} // namespace

@ -736,7 +736,7 @@ static void convert_metadata_to_cronet_headers(
if (grpc_is_binary_header(GRPC_MDKEY(mdelem))) {
grpc_slice wire_value = grpc_chttp2_base64_encode(GRPC_MDVALUE(mdelem));
value = grpc_slice_to_c_string(wire_value);
grpc_slice_unref(wire_value);
grpc_slice_unref_internal(wire_value);
} else {
value = grpc_slice_to_c_string(GRPC_MDVALUE(mdelem));
}

@ -233,7 +233,7 @@ finish:
error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS,
addr_str_slice /* takes ownership */);
} else {
grpc_slice_unref(addr_str_slice);
grpc_slice_unref_internal(addr_str_slice);
}
if (done) {
// This is safe even outside the lock, because "done", the sentinel, is

@ -133,7 +133,7 @@ grpc_security_status grpc_alts_auth_context_from_tsi_peer(
rpc_versions_prop->value.data, rpc_versions_prop->value.length);
bool decode_result =
grpc_gcp_rpc_protocol_versions_decode(slice, &peer_versions);
grpc_slice_unref(slice);
grpc_slice_unref_internal(slice);
if (!decode_result) {
gpr_log(GPR_ERROR, "Invalid peer rpc protocol versions.");
return GRPC_SECURITY_ERROR;

@ -45,7 +45,7 @@ SliceBufferByteStream::SliceBufferByteStream(grpc_slice_buffer* slice_buffer,
SliceBufferByteStream::~SliceBufferByteStream() {}
void SliceBufferByteStream::Orphan() {
grpc_slice_buffer_destroy(&backing_buffer_);
grpc_slice_buffer_destroy_internal(&backing_buffer_);
GRPC_ERROR_UNREF(shutdown_error_);
// Note: We do not actually delete the object here, since
// SliceBufferByteStream is usually allocated as part of a larger

Loading…
Cancel
Save