diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 7bf9ccccb588fbf7bb0a7aaf10c23d1c33482f31..fdb632f0ab851120851e34f8c89e5f2c91d84f81 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -1118,10 +1118,8 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) idr_remove(&sess_idr, conn->sess->session_index); spin_unlock_bh(&sess_idr_lock); } - if (conn->sess->sess_ops) - kfree(conn->sess->sess_ops); - if (conn->sess) - kfree(conn->sess); + kfree(conn->sess->sess_ops); + kfree(conn->sess); old_sess_out: iscsi_stop_login_thread_timer(np); /*