1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Fixes a memory leak when VRF's are in play.

Submitted by:	Prasad Narasimha (snprasad@cisco.com)
Reviewed by:	rrs
This commit is contained in:
Randall Stewart 2008-02-22 15:08:10 +00:00
parent 69d5ee4f23
commit 7a846e9ad8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176464

View File

@ -223,6 +223,10 @@ sctp_free_vrf(struct sctp_vrf *vrf)
ret = atomic_fetchadd_int(&vrf->refcount, -1);
if (ret == 1) {
if (vrf->vrf_addr_hash) {
SCTP_HASH_FREE(vrf->vrf_addr_hash, vrf->vrf_addr_hashmark);
vrf->vrf_addr_hash = NULL;
}
/* We zero'd the count */
LIST_REMOVE(vrf, next_vrf);
SCTP_FREE(vrf, SCTP_M_VRF);