summaryrefslogtreecommitdiff
path: root/sbin/unwind/libunbound/services/cache/infra.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/unwind/libunbound/services/cache/infra.c')
-rw-r--r--sbin/unwind/libunbound/services/cache/infra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/unwind/libunbound/services/cache/infra.c b/sbin/unwind/libunbound/services/cache/infra.c
index 2d16bcd6e40..518e69622f8 100644
--- a/sbin/unwind/libunbound/services/cache/infra.c
+++ b/sbin/unwind/libunbound/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);