Fix pointer issue

This commit is contained in:
Markus Moeller 2020-01-10 20:36:44 +00:00
parent d72ad621e5
commit 2c6c326e2e
2 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -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