Fix pointer issue
This commit is contained in:
parent
d72ad621e5
commit
2c6c326e2e
@ -1142,6 +1142,7 @@ static HANDLE_FUNC (handle_upstream)
|
|||||||
mi += 5;
|
mi += 5;
|
||||||
plist->port = (int) get_long_arg (line, &match[mi]);
|
plist->port = (int) get_long_arg (line, &match[mi]);
|
||||||
plist->last_failed_connect = (time_t) 0;
|
plist->last_failed_connect = (time_t) 0;
|
||||||
|
plist->next = NULL;
|
||||||
|
|
||||||
mi += 2;
|
mi += 2;
|
||||||
/* if != -1 we have a list of proxy hosts seperated by |. */
|
/* 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 *)
|
plist->next = (upstream_proxy_list_t *)
|
||||||
safemalloc (sizeof (upstream_proxy_list_t));
|
safemalloc (sizeof (upstream_proxy_list_t));
|
||||||
plist = plist->next;
|
plist = plist->next;
|
||||||
|
plist->next = NULL;
|
||||||
cptr = strchr (pptr, ':');
|
cptr = strchr (pptr, ':');
|
||||||
*cptr++ = '\0';
|
*cptr++ = '\0';
|
||||||
plist->host = strdup (pptr);
|
plist->host = strdup (pptr);
|
||||||
|
@ -237,7 +237,6 @@ static struct upstream *upstream_build (const struct upstream_proxy_list *plist,
|
|||||||
"Nonsense upstream rule: invalid parameters");
|
"Nonsense upstream rule: invalid parameters");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
up->plist = uplcpy (plist);
|
up->plist = uplcpy (plist);
|
||||||
up->domain = safestrdup (domain);
|
up->domain = safestrdup (domain);
|
||||||
#ifdef UPSTREAM_REGEX
|
#ifdef UPSTREAM_REGEX
|
||||||
|
Loading…
Reference in New Issue
Block a user