Moving the attrs into s->bucket_attrs before setting them results in
setting empty attrs into the bucket. This means that reading them back
later gets empty attrs, which can cause a segfault.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
rgw::sal::Attrs a(attrs);
op_ret = s->object->set_obj_attrs(this, s->obj_ctx, &a, nullptr, y);
} else {
- for (auto& iter : attrs) {
- s->bucket_attrs[iter.first] = std::move(iter.second);
- }
op_ret = s->bucket->set_instance_attrs(this, attrs, y);
}