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

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);