mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
Resolver: added missing memory allocation error handling.
This commit is contained in:
parent
09dca40b33
commit
7b3731862b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user