svn commit: r323850 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu Sep 21 09:47:57 UTC 2017


Author: tuexen
Date: Thu Sep 21 09:47:56 2017
New Revision: 323850
URL: https://svnweb.freebsd.org/changeset/base/323850

Log:
  Free the control structure after using is, not before.
  Found by Coverity while scanning the usrsctp library.
  MFC after:	1 week

Modified:
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Thu Sep 21 09:27:44 2017	(r323849)
+++ head/sys/netinet/sctp_indata.c	Thu Sep 21 09:47:56 2017	(r323850)
@@ -1379,10 +1379,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struc
 		}
 		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))) {


More information about the svn-src-head mailing list