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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to