Mercurial > hg > nginx-quic
comparison src/http/ngx_http_upstream.c @ 1916:cc68a7dc2dd0
ngx_resolve_name() frees ctx on immediate failure
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 05 Mar 2008 07:30:44 +0000 |
parents | 68b426b43c31 |
children | 94b03bbd328e |
comparison
equal
deleted
inserted
replaced
1915:91879041b681 | 1916:cc68a7dc2dd0 |
---|---|
420 ctx->type = NGX_RESOLVE_A; | 420 ctx->type = NGX_RESOLVE_A; |
421 ctx->handler = ngx_http_upstream_resolve_handler; | 421 ctx->handler = ngx_http_upstream_resolve_handler; |
422 ctx->data = r; | 422 ctx->data = r; |
423 ctx->timeout = clcf->resolver_timeout; | 423 ctx->timeout = clcf->resolver_timeout; |
424 | 424 |
425 u->resolved->ctx = ctx; | |
426 | |
427 if (ngx_resolve_name(ctx) != NGX_OK) { | 425 if (ngx_resolve_name(ctx) != NGX_OK) { |
428 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 426 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
429 return; | 427 return; |
430 } | 428 } |
429 | |
430 u->resolved->ctx = ctx; | |
431 | 431 |
432 return; | 432 return; |
433 } | 433 } |
434 | 434 |
435 found: | 435 found: |