diff --git a/src/conf.c b/src/conf.c index e3c1589..a069082 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1142,6 +1142,7 @@ static HANDLE_FUNC (handle_upstream) mi += 5; plist->port = (int) get_long_arg (line, &match[mi]); plist->last_failed_connect = (time_t) 0; + plist->next = NULL; mi += 2; /* if != -1 we have a list of proxy hosts seperated by |. */ @@ -1158,6 +1159,7 @@ static HANDLE_FUNC (handle_upstream) plist->next = (upstream_proxy_list_t *) safemalloc (sizeof (upstream_proxy_list_t)); plist = plist->next; + plist->next = NULL; cptr = strchr (pptr, ':'); *cptr++ = '\0'; plist->host = strdup (pptr); diff --git a/src/upstream.c b/src/upstream.c index 9ddaeed..60561a9 100644 --- a/src/upstream.c +++ b/src/upstream.c @@ -237,7 +237,6 @@ static struct upstream *upstream_build (const struct upstream_proxy_list *plist, "Nonsense upstream rule: invalid parameters"); goto fail; } - up->plist = uplcpy (plist); up->domain = safestrdup (domain); #ifdef UPSTREAM_REGEX