]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not put() unhandle message
authorSage Weil <sage@inktank.com>
Sun, 6 Oct 2013 22:12:57 +0000 (15:12 -0700)
committerSage Weil <sage@inktank.com>
Sun, 6 Oct 2013 22:17:50 +0000 (15:17 -0700)
If we return false because we aren't handling a message, we should not put
the ref.  This fixes a double-free.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Monitor.cc

index 3fe658d9623f7bbca579813ccd0fc775a1712ae9..aea8110272077a0a9362e8b970e8e084a26a9f68 100644 (file)
@@ -2586,7 +2586,6 @@ bool Monitor::_ms_dispatch(Message *m)
     if (!src_is_mon && m->get_type() != CEPH_MSG_AUTH) {
       dout(1) << __func__ << " dropping stray message " << *m
         << " from " << m->get_source_inst() << dendl;
-      m->put();
       return false;
     }