diff --git a/source/common/config/utility.h b/source/common/config/utility.h index 1faadb15f3e0..a3b83c808350 100644 --- a/source/common/config/utility.h +++ b/source/common/config/utility.h @@ -299,9 +299,9 @@ class Utility { * @param typed_config for the extension config. */ static std::string getFactoryType(const ProtobufWkt::Any& typed_config) { - static const std::string& typed_struct_type = + static const std::string typed_struct_type = xds::type::v3::TypedStruct::default_instance().GetTypeName(); - static const std::string& legacy_typed_struct_type = + static const std::string legacy_typed_struct_type = udpa::type::v1::TypedStruct::default_instance().GetTypeName(); // Unpack methods will only use the fully qualified type name after the last '/'. // https://github.com/protocolbuffers/protobuf/blob/3.6.x/src/google/protobuf/any.proto#L87 diff --git a/source/common/upstream/upstream_impl.cc b/source/common/upstream/upstream_impl.cc index 5fada0f2a0d0..d69e46453fab 100644 --- a/source/common/upstream/upstream_impl.cc +++ b/source/common/upstream/upstream_impl.cc @@ -1298,7 +1298,7 @@ ClusterInfoImpl::ClusterInfoImpl( if (http_protocol_options_) { Http::FilterChainUtility::FiltersList http_filters = http_protocol_options_->http_filters_; has_configured_http_filters_ = !http_filters.empty(); - static const std::string& upstream_codec_type_url = + static const std::string upstream_codec_type_url = envoy::extensions::filters::http::upstream_codec::v3::UpstreamCodec::default_instance() .GetTypeName(); if (http_filters.empty()) {