diff options
author | Sage Weil <sage@inktank.com> | 2013-06-23 08:52:46 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-23 08:53:12 -0700 |
commit | 9b2dfb7507f930d868ee7f09a0a9da51072d03dc (patch) | |
tree | 4ce75b9af74a61eb66cd769d63d2ab72ada4a59c | |
parent | ad12b0d61b8c4565ee8a5f352689b9121da2bcd2 (diff) | |
download | ceph-9b2dfb7507f930d868ee7f09a0a9da51072d03dc.tar.gz |
mon: do not leak no_reply messages
I think I assumed no_reply() was releasing the references, but it is
not. Which is better, since send_reply() doesn't either. Fix the leaks
by dropping the message ref explicitly.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r-- | src/mon/OSDMonitor.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9db57b9d93d..76915a5f4a1 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -968,8 +968,10 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) << m->get_orig_source_inst() << "\n"; failure_info_t& fi = failure_info[target_osd]; MOSDFailure *old = fi.add_report(reporter, failed_since, m); - if (old) + if (old) { mon->no_reply(old); + old->put(); + } return check_failure(now, target_osd, fi); } else { @@ -983,6 +985,7 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) fi.cancel_report(reporter); while (!ls.empty()) { mon->no_reply(ls.front()); + ls.front()->put(); ls.pop_front(); } if (fi.reporters.empty()) { @@ -997,6 +1000,7 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) dout(10) << " no failure_info for osd." << target_osd << dendl; } mon->no_reply(m); + m->put(); } return false; |