Commit 26ce1719 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Elder

libceph: fix NULL dereference in reset_connection()

We dereference "con->in_msg" on the line after it was set to NULL.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAlex Elder <elder@inktank.com>
parent 9a64e8e0
...@@ -440,7 +440,7 @@ static void reset_connection(struct ceph_connection *con) ...@@ -440,7 +440,7 @@ static void reset_connection(struct ceph_connection *con)
con->in_msg->con = NULL; con->in_msg->con = NULL;
ceph_msg_put(con->in_msg); ceph_msg_put(con->in_msg);
con->in_msg = NULL; con->in_msg = NULL;
ceph_con_put(con->in_msg->con); ceph_con_put(con);
} }
con->connect_seq = 0; con->connect_seq = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment