From: Jeff Trawick Date: Sun, 14 Dec 2003 00:17:41 +0000 (+0000) Subject: merge this fix from 2.1-dev: X-Git-Tag: 2.0.49~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=637141a9bbebd9ae4ed28453f59fb338980f1ade;p=thirdparty%2Fapache%2Fhttpd.git merge this fix from 2.1-dev: Fix memory leak in handling of request bodies during reverse proxy operations. PR: 24991 Submitted by: Larry Toppi Reviewed by: trawick, stas, ianh, stoddard, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102049 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f829609e685..bb1990295e5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ Changes with Apache 2.0.49 + + *) Fix memory leak in handling of request bodies during reverse + proxy operations. PR 24991. [Larry Toppi ] + *) Win32 MPM: Implement MaxMemFree to enable setting an upper limit on the amount of storage used by the bucket brigades in each server thread. [Bill Stoddard] diff --git a/STATUS b/STATUS index cad6e6239bb..dcc568e9ca1 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2003/12/12 17:20:45 $] +Last modified at [$Date: 2003/12/14 00:17:41 $] Release: @@ -185,23 +185,11 @@ PATCHES TO BACKPORT FROM 2.1 * mod_cgid: Restart the cgid daemon if it crashes. PR 19849 modules/generators/mod_cgid.c 1.152 - +1: trawick, gregames, stoddard - oops, 2 problems to deal with: - a) patch relies on worker MPM behavior of - ap_graceful_stop_signalled(), which is to return true if - MPM is exiting (whether stop or restart or graceful); - need MPM state query function working in Unix MPMs first - in order to support this without making the broken - ap_graceful_stop_signalled() more pervasive - b) maybe not the fault of this patch, but on Linux the parent - gets knocked out after a couple of segfaults in cgid - Update: false alarm... due to confusion about pid in - sig_coredump(), a message is written to error log saying - that parent crashed, but it isn't true... bogus message - seems to be due to a kludge to avoid calling getpid() (to - support linuxthreads) not working for - mod_cgid->sig_coredump() when mod_cgid got restarted after - a crash + +1: + oops, also needs: + . 2.1-dev Unix MPM support to query MPM state + . 2.1-dev fix to prevent bogus message about parent crashing when + it is "merely" a restarted cgid daemon which crashed * ab: catch out of memory (reasoning report ID 29) support/ab.c: r1.125 @@ -366,13 +354,6 @@ PATCHES TO BACKPORT FROM 2.1 modules/generators/mod_status.h r1.2 +1: trawick, ianh - * fix memory leak while handling request body with reverse proxy - modules/proxy/proxy_http.c r1.173 - (but code has changed slightly since stable branch so patch - posted to bugzilla is one to use... see PR at - http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24991) - +1: trawick, stas, ianh, stoddard, minfrin - CURRENT RELEASE NOTES: * Backwards compatibility is expected of future Apache 2.0 releases, diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 634f5438458..88c133252cf 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -665,7 +665,8 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, } /* We can't pass this EOS to the output_filters. */ - APR_BUCKET_REMOVE(APR_BRIGADE_LAST(bb)); + e = APR_BRIGADE_LAST(bb); + apr_bucket_delete(e); seen_eos = 1; }