changeset 3864:8e77b5216894

fix u->one_addr handling in ngx_inet_resolve_host() patch by Maxim Dounin
author Igor Sysoev <igor@sysoev.ru>
date Thu, 17 Feb 2011 15:01:16 +0000
parents f596dd1a6d33
children cff87803b898
files src/core/ngx_inet.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -943,7 +943,7 @@ ngx_inet_resolve_host(ngx_pool_t *pool, 
 
         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) {