aboutsummaryrefslogtreecommitdiff
path: root/services/cache/infra.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-08-16 23:55:17 +0000
committerCy Schubert <cy@FreeBSD.org>2021-08-16 23:57:03 +0000
commit625f1c1312fb7defbd148c8ba121a0cf058707ef (patch)
tree31510b9372850c8a8dd3e0a8dac37308308d8429 /services/cache/infra.c
parentd60fa10fd872db7e3d8cb1e161cfdae026c43b14 (diff)
unbound: Vendor import 1.13.2vendor/unbound/1.13.2
Diffstat (limited to 'services/cache/infra.c')
-rw-r--r--services/cache/infra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/cache/infra.c b/services/cache/infra.c
index 2d16bcd6e405..518e69622f83 100644
--- a/services/cache/infra.c
+++ b/services/cache/infra.c
@@ -236,6 +236,9 @@ infra_create(struct config_file* cfg)
sizeof(struct infra_cache));
size_t maxmem = cfg->infra_cache_numhosts * (sizeof(struct infra_key)+
sizeof(struct infra_data)+INFRA_BYTES_NAME);
+ if(!infra) {
+ return NULL;
+ }
infra->hosts = slabhash_create(cfg->infra_cache_slabs,
INFRA_HOST_STARTSIZE, maxmem, &infra_sizefunc, &infra_compfunc,
&infra_delkeyfunc, &infra_deldatafunc, NULL);