libceph: fix NULL dereference in reset_connection()

We dereference "con->in_msg" on the line after it was set to NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Alex Elder <elder@inktank.com>
This commit is contained in:
Dan Carpenter 2012-06-19 08:52:33 -05:00 committed by Alex Elder
parent 9a64e8e0ac
commit 26ce171915
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ static void reset_connection(struct ceph_connection *con)
con->in_msg->con = NULL;
ceph_msg_put(con->in_msg);
con->in_msg = NULL;
ceph_con_put(con->in_msg->con);
ceph_con_put(con);
}
con->connect_seq = 0;