]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: fix possible OSDSession leak on wrong connection 13365/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 11 Feb 2017 02:57:58 +0000 (10:57 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 11 Feb 2017 03:01:15 +0000 (11:01 +0800)
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 <xie.xingguo@zte.com.cn>
src/osdc/Objecter.cc

index f592811b6fcc23cc0a97e19bf031411bed668567..52da00c1702914ae174a2f98612e24cf6b16977b 100644 (file)
@@ -3399,6 +3399,8 @@ void Objecter::handle_osd_backoff(MOSDBackoff *m)
   OSDSession *s = static_cast<OSDSession*>(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;
   }