diff options
author | Sage Weil <sage@inktank.com> | 2012-11-29 14:05:06 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-11-29 15:15:31 -0800 |
commit | b31a99abda75b9170a5805b02944a0c0c78245b7 (patch) | |
tree | bb5a959c2347671bb26f721619f36bfc0202549c | |
parent | 3ceaec4ced007e60d9985d5a6f7660b64d9c94b6 (diff) | |
download | ceph-b31a99abda75b9170a5805b02944a0c0c78245b7.tar.gz |
osd: fix leak of heartbeat con on reset
If we replace our old con, drop the reference.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/osd/OSD.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0b92ebe6ccc..2f4eb0f56ec 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2093,6 +2093,8 @@ bool OSD::heartbeat_reset(Connection *con) return true; } dout(10) << "heartbeat_reset reopen failed hb con " << con << dendl; + if (p->second.con) + p->second.con->put(); p->second.con = newcon; p->second.con->set_priv(s); } else { |