svn commit: r272358 - head/sys/netpfil/pf
Gleb Smirnoff
glebius at FreeBSD.org
Wed Oct 1 13:35:42 UTC 2014
Author: glebius
Date: Wed Oct 1 13:35:41 2014
New Revision: 272358
URL: https://svnweb.freebsd.org/changeset/base/272358
Log:
Use rn_detachhead() instead of direct free(9) for radix tables.
Sponsored by: Nginx, Inc.
Modified:
head/sys/netpfil/pf/pf_table.c
Modified: head/sys/netpfil/pf/pf_table.c
==============================================================================
--- head/sys/netpfil/pf/pf_table.c Wed Oct 1 12:47:25 2014 (r272357)
+++ head/sys/netpfil/pf/pf_table.c Wed Oct 1 13:35:41 2014 (r272358)
@@ -1855,11 +1855,11 @@ pfr_destroy_ktable(struct pfr_ktable *kt
}
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);
More information about the svn-src-all
mailing list