diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-06-16 11:11:32 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-12 09:22:29 -0400 |
commit | c95fddc729fafb43f420747027eeb998c2e5e798 (patch) | |
tree | b40cce114afe66272434758746b29354bfe7dcbe /drivers/scsi/scsi_transport_iscsi.c | |
parent | ff0f4cb5ea322dcc32d08bab2d758c050ba1ab07 (diff) |
[SCSI] iscsi class: fix refcount leak
Must do a module_out if the endpoint lookup fails.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 9fd5c6d87ed1..bc0f74d4ea09 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -1422,8 +1422,10 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
1422 | break; | 1422 | break; |
1423 | case ISCSI_UEVENT_CREATE_BOUND_SESSION: | 1423 | case ISCSI_UEVENT_CREATE_BOUND_SESSION: |
1424 | ep = iscsi_lookup_endpoint(ev->u.c_bound_session.ep_handle); | 1424 | ep = iscsi_lookup_endpoint(ev->u.c_bound_session.ep_handle); |
1425 | if (!ep) | 1425 | if (!ep) { |
1426 | return -EINVAL; | 1426 | err = -EINVAL; |
1427 | break; | ||
1428 | } | ||
1427 | 1429 | ||
1428 | err = iscsi_if_create_session(priv, ep, ev, | 1430 | err = iscsi_if_create_session(priv, ep, ev, |
1429 | ev->u.c_bound_session.initial_cmdsn, | 1431 | ev->u.c_bound_session.initial_cmdsn, |