libceph: fix NULL dereference in reset_connection()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 19 Jun 2012 13:52:33 +0000 (08:52 -0500)
committerAlex Elder <elder@inktank.com>
Tue, 19 Jun 2012 13:52:33 +0000 (08:52 -0500)
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>
net/ceph/messenger.c

index 5e9f61d6d2340ef932068dc88d65609b593d4f63..23073cff648111c2a279488d77940c8d48b4b782 100644 (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;