From b7e70e242d3b3d102c3a85d73af92691c2227840 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 4 Jan 2011 23:55:50 +0000 Subject: [PATCH] mod_proxy_http: Ensure that when the backend is closed, the final call to ap_proxy_http_cleanup() is suppressed, so that the backend is not cleaned twice. Fixes a further thread safety issue. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055246 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 5a221429e7..8b2d5f3815 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1941,7 +1941,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, ap_proxy_release_connection(backend->worker->scheme, backend, r->server); /* Ensure that the backend is not reused */ - backend_ptr = NULL; + *backend_ptr = NULL; } @@ -1954,7 +1954,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, * longer save to fiddle around with backend as it might * be already in use by another thread. */ - if (backend_ptr) { + if (*backend_ptr) { backend->close = 1; /* this causes socket close below */ } finish = TRUE; @@ -1980,7 +1980,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, */ ap_proxy_release_connection(backend->worker->scheme, backend, r->server); - backend_ptr = NULL; + *backend_ptr = NULL; /* Pass EOS bucket down the filter chain. */ e = apr_bucket_eos_create(c->bucket_alloc); -- 2.40.0