summaryrefslogtreecommitdiffstats
path: root/src/resolvers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolvers.c')
-rw-r--r--src/resolvers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resolvers.c b/src/resolvers.c
index 47b0cce..640c9c2 100644
--- a/src/resolvers.c
+++ b/src/resolvers.c
@@ -3919,8 +3919,12 @@ static int rslv_promex_metric_info(unsigned int id, struct promex_metric *metric
static void *rslv_promex_start_ts(void *unused, unsigned int id)
{
- struct resolvers *resolver = LIST_NEXT(&sec_resolvers, struct resolvers *, list);
+ struct resolvers *resolver;
+ if (LIST_ISEMPTY(&sec_resolvers))
+ return NULL;
+
+ resolver = LIST_NEXT(&sec_resolvers, struct resolvers *, list);
return LIST_NEXT(&resolver->nameservers, struct dns_nameserver *, list);
}