提交 5e095e8b 编写于 作者: S Sage Weil

ceph: plug msg leak in con_fault

Signed-off-by: NSage Weil <sage@newdream.net>
上级 c86a2930
......@@ -1434,8 +1434,9 @@ static int read_partial_message(struct ceph_connection *con)
*/
static void process_message(struct ceph_connection *con)
{
struct ceph_msg *msg = con->in_msg;
struct ceph_msg *msg;
msg = con->in_msg;
con->in_msg = NULL;
/* if first message, set peer_name */
......@@ -1810,7 +1811,11 @@ static void ceph_fault(struct ceph_connection *con)
clear_bit(BUSY, &con->state); /* to avoid an improbable race */
con_close_socket(con);
con->in_msg = NULL;
if (con->in_msg) {
ceph_msg_put(con->in_msg);
con->in_msg = NULL;
}
/* If there are no messages in the queue, place the connection
* in a STANDBY state (i.e., don't try to reconnect just yet). */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册