From: Jim Jagielski Date: Fri, 17 Apr 2009 13:44:27 +0000 (+0000) Subject: Merge r757741 from trunk: X-Git-Tag: 2.2.12~169 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b54a5accadbd1f1fc88928c991a9754b84ddc6b8;p=thirdparty%2Fapache%2Fhttpd.git Merge r757741 from trunk: * Fix a memory leak by freeing the memory consumed by the bucket. PR: 44948 Submitted by: Dan Poirier 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 --- diff --git a/CHANGES b/CHANGES index 1554a898f38..fdd5836818c 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 ] + *) mod_proxy_ajp: Forward remote port information by default. [Rainer Jung] diff --git a/STATUS b/STATUS index f54160179f4..6fa1b67c013 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 98beae2c2bc..07030403ab0 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;