Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2016 08:11:43 +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: r302930 - head/sys/netinet
Message-ID:  <201607160811.u6G8BhKr073978@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Jul 16 08:11:43 2016
New Revision: 302930
URL: https://svnweb.freebsd.org/changeset/base/302930

Log:
  Don't free a data chunk twice.
  Found by the clang static code analyzer running for the userland stack.
  
  MFC after:	3 days

Modified:
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Sat Jul 16 08:04:00 2016	(r302929)
+++ head/sys/netinet/sctp_indata.c	Sat Jul 16 08:11:43 2016	(r302930)
@@ -961,11 +961,6 @@ place_chunk:
 			 * should not happen since the FSN is a TSN and it
 			 * should have been dropped earlier.
 			 */
-			if (chk->data) {
-				sctp_m_freem(chk->data);
-				chk->data = NULL;
-			}
-			sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
 			sctp_abort_in_reasm(stcb, control, chk,
 			    abort_flag,
 			    SCTP_FROM_SCTP_INDATA + SCTP_LOC_5);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607160811.u6G8BhKr073978>