summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorEvgenii Lepikhin <johnlepikhin@gmail.com>2015-04-21 15:49:57 +0300
committerNicholas Bellinger <nab@linux-iscsi.org>2015-05-02 16:31:33 -0700
commita928d28d4487402e6bd18bea1b8cc2b2ec6e6d8f (patch)
treeed2d680a2167dcc09ebb7aaf8aaad3dac6252d9e /drivers/target
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadtalos-op-linux-a928d28d4487402e6bd18bea1b8cc2b2ec6e6d8f.tar.gz
talos-op-linux-a928d28d4487402e6bd18bea1b8cc2b2ec6e6d8f.zip
ISCSI: fix minor memory leak
This patch adds a missing kfree for sess->sess_ops memory upon transport_init_session() failure. Signed-off-by: Evgenii Lepikhin <johnlepikhin@gmail.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 8ce94ff744e6..70d799dfab03 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -346,6 +346,7 @@ static int iscsi_login_zero_tsih_s1(
if (IS_ERR(sess->se_sess)) {
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
ISCSI_LOGIN_STATUS_NO_RESOURCES);
+ kfree(sess->sess_ops);
kfree(sess);
return -ENOMEM;
}
OpenPOWER on IntegriCloud