Unlock the lock before destroying it.

This issue was reported by Andrew Galante.

MFC after: 3 days
This commit is contained in:
Michael Tuexen 2013-11-03 14:00:17 +00:00
parent 8310e9ea5d
commit 3b3d05d769
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257574

View File

@ -4332,6 +4332,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr,
asoc->nr_mapping_array = NULL;
}
SCTP_DECR_ASOC_COUNT();
SCTP_TCB_UNLOCK(stcb);
SCTP_TCB_LOCK_DESTROY(stcb);
SCTP_TCB_SEND_LOCK_DESTROY(stcb);
LIST_REMOVE(stcb, sctp_tcbasocidhash);
@ -5134,6 +5135,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
/* Insert new items here :> */
/* Get rid of LOCK */
SCTP_TCB_UNLOCK(stcb);
SCTP_TCB_LOCK_DESTROY(stcb);
SCTP_TCB_SEND_LOCK_DESTROY(stcb);
if (from_inpcbfree == SCTP_NORMAL_PROC) {