Skip to content

Commit

Permalink
mon/MDSMonitor: fix memory leak in prepare_beacon
Browse files Browse the repository at this point in the history
prepare_beacon() case of prepare_update() should put()
message in two more cases, because is the last step
of dispatch()

Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
  • Loading branch information
Igor Podoski committed Nov 17, 2016
1 parent f776699 commit 3d2f304
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mon/MDSMonitor.cc
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3d2f304

Please sign in to comment.