Author: tuexen
Date: Sun Jan 18 21:16:22 2015
New Revision: 277348
URL: https://svnweb.freebsd.org/changeset/base/277348

Log:
  Remove an unnecessary check.
  
  Reported by:  Coverity
  CID:          749576
  MFC after:    1 week

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c       Sun Jan 18 20:53:20 2015        
(r277347)
+++ head/sys/netinet/sctp_input.c       Sun Jan 18 21:16:22 2015        
(r277348)
@@ -3108,7 +3108,6 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun
        uint32_t cwr_tsn;
 
        cwr_tsn = ntohl(cp->tsn);
-
        override = cp->ch.chunk_flags & SCTP_CWR_REDUCE_OVERRIDE;
        TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
                if (chk->rec.chunk_id.id != SCTP_ECN_ECHO) {
@@ -3124,10 +3123,8 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun
                        stcb->asoc.ecn_echo_cnt_onq--;
                        TAILQ_REMOVE(&stcb->asoc.control_send_queue, chk,
                            sctp_next);
-                       if (chk->data) {
-                               sctp_m_freem(chk->data);
-                               chk->data = NULL;
-                       }
+                       sctp_m_freem(chk->data);
+                       chk->data = NULL;
                        stcb->asoc.ctrl_queue_cnt--;
                        sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
                        if (override == 0) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to