summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_pcb.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2014-09-06 20:03:24 +0000
committertuexen <tuexen@FreeBSD.org>2014-09-06 20:03:24 +0000
commit65ac57de621eb7d24690712b3f4935438bcd73ae (patch)
tree9a30e00a689b971869c4dbd6e16158d589649e4c /sys/netinet/sctp_pcb.c
parent409097f5b7763cab73f25d1915b9d4adeff46ae6 (diff)
downloadFreeBSD-src-65ac57de621eb7d24690712b3f4935438bcd73ae.zip
FreeBSD-src-65ac57de621eb7d24690712b3f4935438bcd73ae.tar.gz
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
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r--sys/netinet/sctp_pcb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 39348a4..5a03035 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -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();
OpenPOWER on IntegriCloud