Fix M_RTABLE memory leak from r274118 (11/2014).

Replace free(M_RTABLE) with rn_detachhead() to match rn_inithead().

This would trigger when reloading NFS exports and was similar to
problems with pf reload [1].

PR:		194078 [1]
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
bdrewery 2016-03-24 03:08:39 +00:00
parent 6bdd8730ff
commit 91bc17507f

View File

@ -259,7 +259,7 @@ vfs_free_addrlist_af(struct radix_node_head **prnh)
(*rnh->rnh_walktree)(&rnh->rh, vfs_free_netcred, &rnh->rh);
RADIX_NODE_HEAD_UNLOCK(rnh);
RADIX_NODE_HEAD_DESTROY(rnh);
free(rnh, M_RTABLE);
rn_detachhead((void **)prnh);
prnh = NULL;
}