iscsi-target: nullify session in failed login sequence

In case login sequence failed, make sure conn->sess is
NULL before calling wait_conn as some transports (iser)
may rely on that (waiting for session commands).

Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
Sagi Grimberg 2014-12-15 15:08:54 +02:00 • committed by Nicholas Bellinger
commit a0b3b9b240

View file

@ -1159,6 +1159,7 @@ void iscsi_target_login_sess_out(struct iscsi_conn *conn,
}
kfree(conn->sess->sess_ops);
kfree(conn->sess);
conn->sess = NULL;
old_sess_out:
iscsi_stop_login_thread_timer(np);