diff options
-rw-r--r-- | external/unbound/libunbound/libunbound.c | 1 | ||||
-rw-r--r-- | src/common/dns_utils.cpp | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/external/unbound/libunbound/libunbound.c b/external/unbound/libunbound/libunbound.c index 91a663a77..af2ca0d30 100644 --- a/external/unbound/libunbound/libunbound.c +++ b/external/unbound/libunbound/libunbound.c @@ -1028,7 +1028,6 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) "\\hosts"); retval=ub_ctx_hosts(ctx, buf); } - free(name); return retval; } return UB_READFILE; diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 4ab93cce8..2ac49bf4b 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -162,11 +162,9 @@ DNSResolver::DNSResolver() : m_data(new DNSResolverData()) // init libunbound context m_data->m_ub_context = ub_ctx_create(); - char empty_string = '\0'; - // look for "/etc/resolv.conf" and "/etc/hosts" or platform equivalent - ub_ctx_resolvconf(m_data->m_ub_context, &empty_string); - ub_ctx_hosts(m_data->m_ub_context, &empty_string); + ub_ctx_resolvconf(m_data->m_ub_context, NULL); + ub_ctx_hosts(m_data->m_ub_context, NULL); ub_ctx_add_ta(m_data->m_ub_context, ::get_builtin_ds()); } |