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:
Mateusz Guzik 2012-06-08 08:04:51 +00:00
parent c18783f219
commit 3b5da8d609
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236738

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