summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/unwind/resolver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c
index 4f69c99230b..6287cad7326 100644
--- a/sbin/unwind/resolver.c
+++ b/sbin/unwind/resolver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolver.c,v 1.45 2019/09/30 18:07:09 florian Exp $ */
+/* $OpenBSD: resolver.c,v 1.46 2019/10/19 17:42:21 otto Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -744,8 +744,14 @@ parse_dhcp_forwarders(char *forwarders)
new_forwarders();
if (resolver_conf->captive_portal_auto)
check_captive_portal(1);
- } else
+ } else {
+ while ((uw_forwarder =
+ SIMPLEQ_FIRST(&new_forwarder_list)) != NULL) {
+ SIMPLEQ_REMOVE_HEAD(&new_forwarder_list, entry);
+ free(uw_forwarder);
+ }
log_debug("%s: forwarders didn't change", __func__);
+ }
}
void