mirror of
https://github.com/nginx/nginx.git
synced 2024-12-04 13:59:00 +08:00
fix segfault, introduced in r2423
This commit is contained in:
parent
503c075122
commit
9b753d2eea
@ -512,7 +512,7 @@ ngx_http_fastcgi_eval(ngx_http_request_t *r, ngx_http_fastcgi_loc_conf_t *flcf)
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (u.addrs[0].sockaddr) {
|
||||
if (u.addrs && u.addrs[0].sockaddr) {
|
||||
r->upstream->resolved->sockaddr = u.addrs[0].sockaddr;
|
||||
r->upstream->resolved->socklen = u.addrs[0].socklen;
|
||||
r->upstream->resolved->naddrs = 1;
|
||||
|
@ -614,7 +614,7 @@ ngx_http_proxy_eval(ngx_http_request_t *r, ngx_http_proxy_ctx_t *ctx,
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (u.addrs[0].sockaddr) {
|
||||
if (u.addrs && u.addrs[0].sockaddr) {
|
||||
r->upstream->resolved->sockaddr = u.addrs[0].sockaddr;
|
||||
r->upstream->resolved->socklen = u.addrs[0].socklen;
|
||||
r->upstream->resolved->naddrs = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user