Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a928d28d authored by Evgenii Lepikhin's avatar Evgenii Lepikhin Committed by Nicholas Bellinger
Browse files

ISCSI: fix minor memory leak



This patch adds a missing kfree for sess->sess_ops memory upon
transport_init_session() failure.

Signed-off-by: default avatarEvgenii Lepikhin <johnlepikhin@gmail.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent b787f68c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}