Skip to content

Commit 597425b

Browse files
authored
eds: fix crash for invalid configuration (#39083)
There was missing error handling when this code was changed to not use execeptions. The `info_` pointer may be nullptr if the `creation_status` is not succesful, which is dereferenced to get a stats scope. Risk Level: Low Testing: Missing Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] Signed-off-by: Greg Greenway <[email protected]>
1 parent 9fcb9a0 commit 597425b

File tree

1 file changed

+1
-0
lines changed
  • source/extensions/clusters/eds

1 file changed

+1
-0
lines changed

source/extensions/clusters/eds/eds.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ EdsClusterImpl::EdsClusterImpl(const envoy::config::cluster::v3::Cluster& cluste
3535
Runtime::runtimeFeatureEnabled("envoy.restart_features.use_eds_cache_for_ads")
3636
? cluster_context.clusterManager().edsResourcesCache()
3737
: absl::nullopt) {
38+
RETURN_ONLY_IF_NOT_OK_REF(creation_status);
3839
Event::Dispatcher& dispatcher = cluster_context.serverFactoryContext().mainThreadDispatcher();
3940
assignment_timeout_ = dispatcher.createTimer([this]() -> void { onAssignmentTimeout(); });
4041
const auto& eds_config = cluster.eds_cluster_config().eds_config();

0 commit comments

Comments
 (0)