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>
This commit is contained in:
parent
b787f68c36
commit
a928d28d44
|
@ -346,6 +346,7 @@ static int iscsi_login_zero_tsih_s1(
|
||||||
if (IS_ERR(sess->se_sess)) {
|
if (IS_ERR(sess->se_sess)) {
|
||||||
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
|
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
|
||||||
ISCSI_LOGIN_STATUS_NO_RESOURCES);
|
ISCSI_LOGIN_STATUS_NO_RESOURCES);
|
||||||
|
kfree(sess->sess_ops);
|
||||||
kfree(sess);
|
kfree(sess);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue