Commit b07c28aa authored by Sachin Kamat's avatar Sachin Kamat Committed by Nicholas Bellinger

iscsi_target: Remove redundant null check before kfree

kfree on null pointer is a no-op.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 3a41d85f
......@@ -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);
/*
......
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