Use rn_detachhead() instead of direct free(9) for radix tables.
Sponsored by: Nginx, Inc.
This commit is contained in:
parent
3dde11c478
commit
495a22b595
@ -1855,11 +1855,11 @@ pfr_destroy_ktable(struct pfr_ktable *kt, int flushaddr)
|
||||
}
|
||||
if (kt->pfrkt_ip4 != NULL) {
|
||||
RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip4);
|
||||
free((caddr_t)kt->pfrkt_ip4, M_RTABLE);
|
||||
rn_detachhead((void **)&kt->pfrkt_ip4);
|
||||
}
|
||||
if (kt->pfrkt_ip6 != NULL) {
|
||||
RADIX_NODE_HEAD_DESTROY(kt->pfrkt_ip6);
|
||||
free((caddr_t)kt->pfrkt_ip6, M_RTABLE);
|
||||
rn_detachhead((void **)&kt->pfrkt_ip6);
|
||||
}
|
||||
if (kt->pfrkt_shadow != NULL)
|
||||
pfr_destroy_ktable(kt->pfrkt_shadow, flushaddr);
|
||||
|
Loading…
Reference in New Issue
Block a user