mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
[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>
This commit is contained in:
parent
ff0f4cb5ea
commit
c95fddc729
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue