This commit adds a static const empty string at `src/rgw/rgw_sync_checkpoint.cc`
that lives in the scope of the `empty` function to avoid access access a destructured temporary variable.
Fixes: https://tracker.ceph.com/issues/57516
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
bool empty(const BucketIndexShardsManager& markers, int size)
{
+ static const std::string empty_string;
for (int i = 0; i < size; ++i) {
- const auto& m = markers.get(i, "");
+ const auto& m = markers.get(i, empty_string);
if (!m.empty()) {
return false;
}