Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2014 20:03:25 +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: r271209 - head/sys/netinet
Message-ID:  <201409062003.s86K3PAG094143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Sep  6 20:03:24 2014
New Revision: 271209
URL: http://svnweb.freebsd.org/changeset/base/271209

Log:
  Fix a leak of an address, if the address is scheduled for removal
  and the stack is torn down.
  Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the
  issue.
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Sat Sep  6 19:47:37 2014	(r271208)
+++ head/sys/netinet/sctp_pcb.c	Sat Sep  6 20:03:24 2014	(r271209)
@@ -5976,6 +5976,9 @@ sctp_pcb_finish(void)
 	LIST_FOREACH_SAFE(wi, &SCTP_BASE_INFO(addr_wq), sctp_nxt_addr, nwi) {
 		LIST_REMOVE(wi, sctp_nxt_addr);
 		SCTP_DECR_LADDR_COUNT();
+		if (wi->action == SCTP_DEL_IP_ADDRESS) {
+			SCTP_FREE(wi->ifa, SCTP_M_IFA);
+		}
 		SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), wi);
 	}
 	SCTP_WQ_ADDR_UNLOCK();



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