summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2009-04-17 13:44:27 +0000
committerJim Jagielski <jim@apache.org>2009-04-17 13:44:27 +0000
commitb54a5accadbd1f1fc88928c991a9754b84ddc6b8 (patch)
treef4bf986864ac49de009a5dcda52e9212298d545b
parentda1b3b0a470a1d557b3530c18c6e7984626ec91a (diff)
downloadhttpd-b54a5accadbd1f1fc88928c991a9754b84ddc6b8.tar.gz
Merge r757741 from trunk:
* Fix a memory leak by freeing the memory consumed by the bucket. PR: 44948 Submitted by: Dan Poirier <poirier pobox.com> Reviewed by: rpluem Submitted by: rpluem Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@766002 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--STATUS7
-rw-r--r--modules/filters/mod_substitute.c2
3 files changed, 4 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index 1554a898f3..fdd5836818 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.12
+ *) mod_substitute: Fix a memory leak. PR 44948
+ [Dan Poirier <poirier pobox.com>]
+
*) mod_proxy_ajp: Forward remote port information by default.
[Rainer Jung]
diff --git a/STATUS b/STATUS
index f54160179f..6fa1b67c01 100644
--- a/STATUS
+++ b/STATUS
@@ -95,13 +95,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_substitute: Fix a memory leak.
- Trunk version of patch:
- http://svn.apache.org/viewvc?rev=757741&view=rev
- Backport version for 2.2.x of patch:
- Trunk version of patch works
- +1: rpluem, gregames, jim
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c
index 98beae2c2b..07030403ab 100644
--- a/modules/filters/mod_substitute.c
+++ b/modules/filters/mod_substitute.c
@@ -373,7 +373,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
*/
rv = apr_bucket_read(b, &buff, &bytes, APR_BLOCK_READ);
if (rv != APR_SUCCESS || bytes == 0) {
- APR_BUCKET_REMOVE(b);
+ apr_bucket_delete(b);
}
else {
int num = 0;