mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
check endpoints is not empty before use it.
Signed-off-by: VRan Liu <gliuwr@gmail.com>
This commit is contained in:
parent
ca13ce1b35
commit
9d5e4edc15
@ -373,7 +373,7 @@ static int rgw_build_policies(RGWRados *store, struct req_state *s, bool only_bu
|
||||
|
||||
string& region = s->bucket_info.region;
|
||||
map<string, RGWRegion>::iterator dest_region = store->region_map.regions.find(region);
|
||||
if (dest_region != store->region_map.regions.end()) {
|
||||
if (dest_region != store->region_map.regions.end() && !dest_region->second.endpoints.empty()) {
|
||||
s->region_endpoint = dest_region->second.endpoints.front();
|
||||
}
|
||||
if (s->bucket_exists && !store->region.equals(region)) {
|
||||
|
Loading…
Reference in New Issue
Block a user