Skip to content

Commit 1e37f66

Browse files
authored
Merge pull request ceph#63599 from tchaikov/wip-dbstore_tests
rgw/dbstore: free objectmap in DB::Destroy() Reviewed-by: Soumya Koduri <[email protected]>
2 parents 4525a5d + 2e6108d commit 1e37f66

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/rgw/driver/dbstore/common/dbstore.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ int DB::Destroy(const DoutPrefixProvider *dpp)
8282

8383
closeDB(dpp);
8484

85+
{
86+
const std::lock_guard lk(mtx);
87+
for (auto& bucket_object : DB::objectmap) {
88+
delete bucket_object.second;
89+
}
90+
objectmap.clear();
91+
}
8592

8693
ldpp_dout(dpp, 20)<<"DB successfully destroyed - name:" \
8794
<<db_name << dendl;

0 commit comments

Comments
 (0)