Date: Thu, 21 Sep 2017 09:47:56 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323850 - head/sys/netinet Message-ID: <201709210947.v8L9lupH060431@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709210947.v8L9lupH060431>