iscsi-target: Fix sess allocation leak in iscsi_login_zero_tsih_s1
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 4 Nov 2011 18:36:38 +0000 (11:36 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 6 Dec 2011 06:00:49 +0000 (06:00 +0000)
commit0957627a99604f379d35831897a2aa15272528fc
tree250335ec7dcc6816a7b8135076058a494745f689
parent03e98c9eb916f3f0868c1dc344dde2a60287ff72
iscsi-target: Fix sess allocation leak in iscsi_login_zero_tsih_s1

This patch adds missing kfree() for an allocation in iscsi_login_zero_tsih_s1()
code, and make transport_init_session() check for IS_ERR() returns.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_login.c