aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-03-05 07:30:44 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-03-05 07:30:44 +0000
commitcca60002475161e52badfbb008392db5977b286b (patch)
treed96f6e1eb7e01aa33e93adaecea6160873516420 /src
parent887dd4e5d50d2064324482b3c1625961af8f80d9 (diff)
downloadnginx-cca60002475161e52badfbb008392db5977b286b.tar.gz
nginx-cca60002475161e52badfbb008392db5977b286b.zip
ngx_resolve_name() frees ctx on immediate failure
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 241277902..7041514c8 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -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;
}