diff options
Diffstat (limited to 'libglusterfs/src/common-utils.c')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 694a9040c95..1be1f81268b 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -150,7 +150,8 @@ gf_resolve_ip6 (const char *hostname,  		*addr_info = cache->next;  	} -	cache->next = cache->next->ai_next; +        if (cache->next) +                cache->next = cache->next->ai_next;  	if (cache->next) {  		ret = getnameinfo((struct sockaddr *)cache->next->ai_addr,  				  cache->next->ai_addrlen,  | 
