You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2010/11/04 09:37:13 UTC

svn commit: r1030855 - /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c

Author: minfrin
Date: Thu Nov  4 08:37:13 2010
New Revision: 1030855

URL: http://svn.apache.org/viewvc?rev=1030855&view=rev
Log:
Fix a pool lifetime issue: Make sure we clean up our brigade before we
hand the backend connection back to the connection pool.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=1030855&r1=1030854&r2=1030855&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Thu Nov  4 08:37:13 2010
@@ -1902,9 +1902,10 @@ apr_status_t ap_proxy_http_process_respo
 
                     /* 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_respo
                     }
 
                     /* make sure we always clean up after ourselves */
-                    apr_brigade_cleanup(bb);
                     apr_brigade_cleanup(pass_bb);
 
                 } while (!finish);