]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: pass boost intrusive_ptr to DataLogBackends flat_map
authorVedansh Bhartia <vedanshbhartia@gmail.com>
Wed, 7 Jun 2023 15:09:51 +0000 (20:39 +0530)
committerVedansh Bhartia <vedanshbhartia@gmail.com>
Wed, 7 Jun 2023 15:09:51 +0000 (20:39 +0530)
commit6b0c045329ff42407f1cc0d5ee958a3d080604d3
tree20a938b11f6ee189445ef86e767d1432cbae23f3
parent1caadd7f2a642c1b490f3d8f4f1fb35f4684fcdc
rgw: pass boost intrusive_ptr to DataLogBackends flat_map
When emplacing a new backend, use an explicitly constructed
intrusive_ptr so that it gets destroyed if the emplace fails.

Though the destructor is already called, this behaviour cannot be relied
upon. std::map does not exhibit the same behaviour, and would have
leaked memory had it been used instead.

Signed-off-by: Vedansh Bhartia <vedanshbhartia@gmail.com>
src/rgw/driver/rados/rgw_datalog.cc