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

Commit c95fddc7 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[SCSI] iscsi class: fix refcount leak



Must do a module_out if the endpoint lookup fails.

Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent ff0f4cb5
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1422,8 +1422,10 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
		break;
		break;
	case ISCSI_UEVENT_CREATE_BOUND_SESSION:
	case ISCSI_UEVENT_CREATE_BOUND_SESSION:
		ep = iscsi_lookup_endpoint(ev->u.c_bound_session.ep_handle);
		ep = iscsi_lookup_endpoint(ev->u.c_bound_session.ep_handle);
		if (!ep)
		if (!ep) {
			return -EINVAL;
			err = -EINVAL;
			break;
		}


		err = iscsi_if_create_session(priv, ep, ev,
		err = iscsi_if_create_session(priv, ep, ev,
					ev->u.c_bound_session.initial_cmdsn,
					ev->u.c_bound_session.initial_cmdsn,