Plug socket refcount leak on error in sys_sctp_peeloff.

Reviewed by:	tuexen
Approved by:	trasz (mentor)
MFC after:	3 days
This commit is contained in:
mjg 2012-06-08 08:04:51 +00:00
parent 93f5c479a5
commit 1d2ca7b8d8

View File

@ -2327,11 +2327,11 @@ sys_sctp_peeloff(td, uap)
goto done2;
if (head->so_proto->pr_protocol != IPPROTO_SCTP) {
error = EOPNOTSUPP;
goto done2;
goto done;
}
error = sctp_can_peel_off(head, (sctp_assoc_t)uap->name);
if (error)
goto done2;
goto done;
/*
* At this point we know we do have a assoc to pull
* we proceed to get the fd setup. This may block