mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
check endpoints is not empty before use it.
Signed-off-by: VRan Liu <gliuwr@gmail.com>
(cherry picked from commit 9d5e4edc15
)
This commit is contained in:
parent
d7a9bf7cdb
commit
8b195eccad
@ -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