Skip to content

Commit

Permalink
Merge pull request #104 from jplevyak/release-1.2
Browse files Browse the repository at this point in the history
Fix potential null pointer dereference.
  • Loading branch information
Francois Pesce committed Sep 12, 2019
2 parents 9ddb95e + e8b4e62 commit 52a3903
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/common/upstream/cluster_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ bool ClusterManagerImpl::addOrUpdateCluster(const envoy::api::v2::Cluster& clust
existing_warming_cluster != warming_clusters_.end()) {
// The following init manager remove call is a NOP in the case we are already initialized. It's
// just kept here to avoid additional logic.
init_helper_.removeCluster(*existing_active_cluster->second->cluster_);
if (existing_active_cluster != active_clusters_.end()) {
init_helper_.removeCluster(*existing_active_cluster->second->cluster_);
}
cm_stats_.cluster_modified_.inc();
} else {
cm_stats_.cluster_added_.inc();
Expand Down

0 comments on commit 52a3903

Please sign in to comment.