From 34150e9a86aa04d18248701b9327a6176bcfed0a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 26 Nov 2017 22:43:21 +0000 Subject: [PATCH] [Minor] Save nameserver name when parsing upstreams from resolv.conf --- src/libutil/upstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index 5d421b212..71b8de877 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -612,8 +612,8 @@ rspamd_upstreams_add_upstream (struct upstream_list *ups, const gchar *str, break; case RSPAMD_UPSTREAM_PARSE_NAMESERVER: addrs = g_ptr_array_sized_new (1); - ret = rspamd_parse_inet_address (&addr, str, strlen (str)); + up->name = rspamd_mempool_strdup (ups->ctx->pool, str); if (ret) { if (rspamd_inet_address_get_port (addr) == 0) { -- 2.39.5