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:
parent
69d5ee4f23
commit
7a846e9ad8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176464
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user