mirror of
https://github.com/nginx/nginx.git
synced 2024-12-23 07:33:29 -06:00
fix u->one_addr handling in ngx_inet_resolve_host()
patch by Maxim Dounin
This commit is contained in:
parent
95899a3f19
commit
d53c836214
@ -943,7 +943,7 @@ ngx_inet_resolve_host(ngx_pool_t *pool, ngx_url_t *u)
|
||||
|
||||
u->naddrs = i;
|
||||
|
||||
for (i = 0; h->h_addr_list[i] != NULL; i++) {
|
||||
for (i = 0; i < u->naddrs; i++) {
|
||||
|
||||
sin = ngx_pcalloc(pool, sizeof(struct sockaddr_in));
|
||||
if (sin == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user