From cb9cc4e57a2abd5c13f61599a7fe594c5f21c9c3 Mon Sep 17 00:00:00 2001 From: Igor Podoski Date: Mon, 11 Jul 2016 12:37:25 +0200 Subject: [PATCH] mon/MDSMonitor: fix memory leak in prepare_beacon prepare_beacon() case of prepare_update() should put() message in two more cases, because is the last step of dispatch() Fixes: http://tracker.ceph.com/issues/17285 Signed-off-by: Igor Podoski --- src/mon/MDSMonitor.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 5aa8866f6c091..1b03a91b9d4c7 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -432,6 +432,7 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m) // Ignore beacons if filesystem is disabled if (!mdsmap.get_enabled()) { dout(1) << "warning, MDS " << m->get_orig_source_inst() << " up but filesystem disabled" << dendl; + m->put(); return false; } @@ -501,6 +502,7 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m) dout(0) << "got beacon for MDS in STATE_STOPPING, ignoring requested state change" << dendl; _note_beacon(m); + m->put(); return true; } -- 2.39.5