diff options
author | tuexen <tuexen@FreeBSD.org> | 2014-09-06 20:03:24 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2014-09-06 20:03:24 +0000 |
commit | 65ac57de621eb7d24690712b3f4935438bcd73ae (patch) | |
tree | 9a30e00a689b971869c4dbd6e16158d589649e4c /sys/netinet/sctp_pcb.c | |
parent | 409097f5b7763cab73f25d1915b9d4adeff46ae6 (diff) | |
download | FreeBSD-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.c | 3 |
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(); |