this updates an earlier octopus-only fix,
0de02a88be0972c89ed2bb10dc438d080137bd18, to also free the RGWBucket*
in each map entry
this issue only exists on octopus, so this fix targets octopus directly
instead of cherry-picking from master
Fixes: https://tracker.ceph.com/issues/54482
Signed-off-by: Casey Bodley <cbodley@redhat.com>
}
RGWBucketList::~RGWBucketList()
+{
+ clear();
+}
+
+void RGWBucketList::clear()
{
for (auto itr = buckets.begin(); itr != buckets.end(); itr++) {
delete itr->second;
}
buckets.clear();
+ truncated = false;
}
RGWBucket* RGWRadosUser::add_bucket(rgw_bucket& bucket,
buckets[bucket->ent.bucket.name] = bucket;
}
size_t count() const { return buckets.size(); }
- void clear() { buckets.clear(); truncated = false; }
+ void clear();
}; // class RGWBucketList
class RGWObject {