diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-21 05:44:40 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-11-28 01:49:20 -0500 |
commit | b07c28aab52edffb592429637fed846c48dca0a8 (patch) | |
tree | b20cae3629c03407afa416b94056947eeab7cf09 /drivers/target/iscsi | |
parent | 3a41d85febdd3ab060bd8a074862280c4aea29d5 (diff) |
iscsi_target: Remove redundant null check before kfree
kfree on null pointer is a no-op.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_login.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 7bf9ccccb588..fdb632f0ab85 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c | |||
@@ -1118,10 +1118,8 @@ new_sess_out: | |||
1118 | idr_remove(&sess_idr, conn->sess->session_index); | 1118 | idr_remove(&sess_idr, conn->sess->session_index); |
1119 | spin_unlock_bh(&sess_idr_lock); | 1119 | spin_unlock_bh(&sess_idr_lock); |
1120 | } | 1120 | } |
1121 | if (conn->sess->sess_ops) | 1121 | kfree(conn->sess->sess_ops); |
1122 | kfree(conn->sess->sess_ops); | 1122 | kfree(conn->sess); |
1123 | if (conn->sess) | ||
1124 | kfree(conn->sess); | ||
1125 | old_sess_out: | 1123 | old_sess_out: |
1126 | iscsi_stop_login_thread_timer(np); | 1124 | iscsi_stop_login_thread_timer(np); |
1127 | /* | 1125 | /* |