From: Mike Christie Date: Mon, 16 Jun 2008 15:11:32 +0000 (-0500) Subject: [SCSI] iscsi class: fix refcount leak X-Git-Tag: v2.6.27-rc1~1059^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c95fddc729fafb43f420747027eeb998c2e5e798;p=linux-2.6-omap-h63xx.git [SCSI] iscsi class: fix refcount leak Must do a module_out if the endpoint lookup fails. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 9fd5c6d87ed..bc0f74d4ea0 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) break; case ISCSI_UEVENT_CREATE_BOUND_SESSION: ep = iscsi_lookup_endpoint(ev->u.c_bound_session.ep_handle); - if (!ep) - return -EINVAL; + if (!ep) { + err = -EINVAL; + break; + } err = iscsi_if_create_session(priv, ep, ev, ev->u.c_bound_session.initial_cmdsn,