From ad304a7d8e7baae89c575f0073d75996a13091a2 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sat, 11 Feb 2017 10:57:58 +0800 Subject: [PATCH] osdc/Objecter: fix possible OSDSession leak on wrong connection This is introduced by the newly added backoff logic. Not sure if it will really happen, but just in case. Signed-off-by: xie xingguo --- src/osdc/Objecter.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index f592811b6fcc2..52da00c170291 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -3399,6 +3399,8 @@ void Objecter::handle_osd_backoff(MOSDBackoff *m) OSDSession *s = static_cast(con->get_priv()); if (!s || s->con != con) { ldout(cct, 7) << __func__ << " no session on con " << con << dendl; + if (s) + s->put(); m->put(); return; } -- 2.39.5