提交 b07c28aa 编写于 作者: S Sachin Kamat 提交者: Nicholas Bellinger

iscsi_target: Remove redundant null check before kfree

kfree on null pointer is a no-op.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 3a41d85f
...@@ -1118,10 +1118,8 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) ...@@ -1118,10 +1118,8 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
idr_remove(&sess_idr, conn->sess->session_index); idr_remove(&sess_idr, conn->sess->session_index);
spin_unlock_bh(&sess_idr_lock); spin_unlock_bh(&sess_idr_lock);
} }
if (conn->sess->sess_ops) kfree(conn->sess->sess_ops);
kfree(conn->sess->sess_ops); kfree(conn->sess);
if (conn->sess)
kfree(conn->sess);
old_sess_out: old_sess_out:
iscsi_stop_login_thread_timer(np); iscsi_stop_login_thread_timer(np);
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册