Resolver: added missing memory allocation error handling.

This commit is contained in:
Maxim Dounin 2012-10-24 14:07:08 +00:00
parent 09dca40b33
commit 7b3731862b

View File

@ -2144,6 +2144,10 @@ ngx_resolver_rotate(ngx_resolver_t *r, in_addr_t *src, ngx_uint_t n)
dst = ngx_resolver_alloc(r, n * sizeof(in_addr_t));
if (dst == NULL) {
return dst;
}
j = ngx_random() % n;
if (j == 0) {