summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgenii Lepikhin <johnlepikhin@gmail.com>2015-04-21 14:49:57 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-05-03 01:31:33 +0200
commita928d28d4487402e6bd18bea1b8cc2b2ec6e6d8f (patch)
treeed2d680a2167dcc09ebb7aaf8aaad3dac6252d9e
parentLinux 4.1-rc1 (diff)
downloadlinux-a928d28d4487402e6bd18bea1b8cc2b2ec6e6d8f.tar.xz
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>
-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;
}