summaryrefslogtreecommitdiff
path: root/src/caches/dcache_free.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-29 23:07:18 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-29 23:07:18 +0000
commite5f5b81d65a5ed9b34910a58707b870d677c6183 (patch)
tree6e87cfda96222560751e200ca5ef7dd8d7cd65f4 /src/caches/dcache_free.c
parent5b063a4db3e631d40c05b77ecc7554ebdf5fff92 (diff)
downloads6-dns-e5f5b81d65a5ed9b34910a58707b870d677c6183.tar.xz
Refactor libdcache, expose dcache_clean_expired()
Diffstat (limited to 'src/caches/dcache_free.c')
-rw-r--r--src/caches/dcache_free.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/caches/dcache_free.c b/src/caches/dcache_free.c
index 7937332..1ba8041 100644
--- a/src/caches/dcache_free.c
+++ b/src/caches/dcache_free.c
@@ -6,8 +6,6 @@
#include <s6-dns/dcache.h>
-static dcache_t const dcache_zero = DCACHE_ZERO ;
-
static void dcache_node_free (void *p)
{
alloc_free(((dcache_node_t *)p)->key.s) ;
@@ -15,6 +13,7 @@ static void dcache_node_free (void *p)
void dcache_free (dcache_t *z)
{
+ static dcache_t const dcache_zero = DCACHE_ZERO ;
avltree_free(&z->by_expire) ;
avltree_free(&z->by_entry) ;
avltree_free(&z->by_key) ;