diff --git a/src/server.c b/src/server.c index a151fd4cf..63569cf04 100644 --- a/src/server.c +++ b/src/server.c @@ -1813,6 +1813,8 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr newsrv->agent.fall = curproxy->defsrv.agent.fall; newsrv->agent.health = newsrv->agent.rise; /* up, but will fall down at first failure */ newsrv->agent.server = newsrv; + if (curproxy->defsrv.resolvers_id != NULL) + newsrv->resolvers_id = strdup(curproxy->defsrv.resolvers_id); newsrv->dns_opts.family_prio = curproxy->defsrv.dns_opts.family_prio; if (newsrv->dns_opts.family_prio == AF_UNSPEC) newsrv->dns_opts.family_prio = AF_INET6; @@ -1939,6 +1941,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr cur_arg += 2; } else if (!strcmp(args[cur_arg], "resolvers")) { + free(newsrv->resolvers_id); newsrv->resolvers_id = strdup(args[cur_arg + 1]); cur_arg += 2; }