]> granicus.if.org Git - apache/commitdiff
mod_proxy_http: Ensure that when the backend is closed, the final call to
authorGraham Leggett <minfrin@apache.org>
Tue, 4 Jan 2011 23:55:50 +0000 (23:55 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 4 Jan 2011 23:55:50 +0000 (23:55 +0000)
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

index 5a221429e74645faba0bd4d6ec9b44f19dc42305..8b2d5f381501927257cd749f2daccfea9fc83417 100644 (file)
@@ -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);