From c81adad1051803e28d5434652188147734a343f2 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Thu, 4 Nov 2010 08:37:13 +0000 Subject: [PATCH] Fix a pool lifetime issue: Make sure we clean up our brigade before we hand the backend connection back to the connection pool. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1030855 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 9454758d71..e2204a6c93 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1902,9 +1902,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, /* Switch the allocator lifetime of the buckets */ ap_proxy_buckets_lifetime_transform(r, bb, pass_bb); + apr_brigade_cleanup(bb); /* found the last brigade? */ - if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) { + if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(pass_bb))) { /* signal that we must leave */ finish = TRUE; @@ -1928,7 +1929,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, } /* make sure we always clean up after ourselves */ - apr_brigade_cleanup(bb); apr_brigade_cleanup(pass_bb); } while (!finish); -- 2.40.0