From: xie xingguo Date: Sat, 11 Feb 2017 02:57:58 +0000 (+0800) Subject: osdc/Objecter: fix possible OSDSession leak on wrong connection X-Git-Tag: v12.0.1~436^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad304a7d8e7baae89c575f0073d75996a13091a2;p=ceph.git 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 --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index f592811b6fcc..52da00c17029 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; }