summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_period_history.cc
diff options
context:
space:
mode:
authorVedansh Bhartia <vedanshbhartia@gmail.com>2023-06-07 19:32:40 +0200
committerVedansh Bhartia <vedanshbhartia@gmail.com>2023-06-07 19:32:40 +0200
commit1e5aa750f02ee88848b83dac3e034ee2622ddb6b (patch)
treee59c7682fb8e24aabbf34c568b9d267d2dcff500 /src/rgw/rgw_period_history.cc
parentMerge PR #47752 into main (diff)
downloadceph-1e5aa750f02ee88848b83dac3e034ee2622ddb6b.tar.xz
ceph-1e5aa750f02ee88848b83dac3e034ee2622ddb6b.zip
rgw: Add coverity annotations for resource leak false positives
Signed-off-by: Vedansh Bhartia <vedanshbhartia@gmail.com>
Diffstat (limited to 'src/rgw/rgw_period_history.cc')
-rw-r--r--src/rgw/rgw_period_history.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rgw/rgw_period_history.cc b/src/rgw/rgw_period_history.cc
index abbd998cfb9..70750368f37 100644
--- a/src/rgw/rgw_period_history.cc
+++ b/src/rgw/rgw_period_history.cc
@@ -133,6 +133,7 @@ RGWPeriodHistory::Impl::Impl(CephContext* cct, Puller* puller,
history->periods.push_back(current_period);
// insert as our current history
+ // coverity[RESOURCE_LEAK:FALSE]
current_history = histories.insert(*history).first;
// get a cursor to the current period
@@ -245,6 +246,7 @@ Cursor RGWPeriodHistory::Impl::insert_locked(RGWPeriod&& period)
// create a new history for this period
auto history = new History;
history->periods.emplace_back(std::move(period));
+ // coverity[RESOURCE_LEAK:FALSE]
histories.insert(last, *history);
i = Set::s_iterator_to(*history);
@@ -294,6 +296,7 @@ Cursor RGWPeriodHistory::Impl::insert_locked(RGWPeriod&& period)
// create a new history for this period
auto history = new History;
history->periods.emplace_back(std::move(period));
+ // coverity[RESOURCE_LEAK:FALSE]
histories.insert(i, *history);
i = Set::s_iterator_to(*history);