# HG changeset patch # User Maxim Dounin # Date 1363278163 0 # Node ID 08b36f2afc3fa88117a654afc31d603f4da3bb9f # Parent d3c15c7831eb6fe322d0326773b0b59d4dcbc494 Upstream: fixed previous commit. Store r->connection on stack to make sure it's still available if request finalization happens to actually free request memory. diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -878,11 +878,13 @@ ngx_http_upstream_cache_send(ngx_http_re static void ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx) { + ngx_connection_t *c; ngx_http_request_t *r; ngx_http_upstream_t *u; ngx_http_upstream_resolved_t *ur; r = ctx->data; + c = r->connection; u = r->upstream; ur = u->resolved; @@ -929,7 +931,7 @@ ngx_http_upstream_resolve_handler(ngx_re failed: - ngx_http_run_posted_requests(r->connection); + ngx_http_run_posted_requests(c); }