From f27964189419f590c5025c515986b1a3af5e2748 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 6 Oct 2013 15:12:57 -0700 Subject: [PATCH] mon: do not put() unhandle message 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 --- src/mon/Monitor.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 3fe658d9623f7..aea8110272077 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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; } -- 2.39.5