This fixes a small memory leak when we have messages queued for the mon
when we shut down. It is harmless except for the valgrind leak check
noise that obscures real leaks.
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
309569a6d0b7df263654b7f3f15b910a72f2918d)
version_requests.erase(version_requests.begin());
}
+ while (!waiting_for_session.empty()) {
+ ldout(cct, 20) << __func__ << " discarding pending message " << *waiting_for_session.front() << dendl;
+ waiting_for_session.front()->put();
+ waiting_for_session.pop_front();
+ }
+
monc_lock.Unlock();
if (initialized) {