Free the control structure after using is, not before.

Found by Coverity while scanning the usrsctp library.
MFC after:	1 week
This commit is contained in:
Michael Tuexen 2017-09-21 09:47:56 +00:00
parent 7c1e70c8f9
commit 53999485e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323850

View File

@ -1379,10 +1379,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
if (sctp_place_control_in_stream(strm, asoc, control)) {
/* Duplicate SSN? */
sctp_clean_up_control(stcb, control);
sctp_abort_in_reasm(stcb, control, chk,
abort_flag,
SCTP_FROM_SCTP_INDATA + SCTP_LOC_6);
sctp_clean_up_control(stcb, control);
return;
}
if ((tsn == (asoc->cumulative_tsn + 1) && (asoc->idata_supported == 0))) {