Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Oct 2014 13:35:41 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272358 - head/sys/netpfil/pf
Message-ID:  <201410011335.s91DZgtV093690@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410011335.s91DZgtV093690>