mirror of
https://github.com/nginx/nginx.git
synced 2024-11-24 13:49:05 +08:00
ngx_resolve_name() frees ctx on immediate failure
This commit is contained in:
parent
887dd4e5d5
commit
cca6000247
@ -422,13 +422,13 @@ ngx_http_upstream_init(ngx_http_request_t *r)
|
||||
ctx->data = r;
|
||||
ctx->timeout = clcf->resolver_timeout;
|
||||
|
||||
u->resolved->ctx = ctx;
|
||||
|
||||
if (ngx_resolve_name(ctx) != NGX_OK) {
|
||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
u->resolved->ctx = ctx;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user