From: Justin Erenkrantz Date: Tue, 10 Sep 2002 19:41:43 +0000 (+0000) Subject: Fix memory leak in core_output_filter. X-Git-Tag: 2.0.42~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13a0a92e12cb9976653cfa54a62381d67af573f8;p=thirdparty%2Fapache%2Fhttpd.git Fix memory leak in core_output_filter. This would result in at least two EOS buckets being leaked per connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96752 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 12cf300e255..be428d831ea 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ Changes with Apache 2.0.41 + *) Fix memory leak in core_output_filter. [Justin Erenkrantz] + *) Add ability to htpasswd (via -5) to produce non-obfuscated MD5 hashes. [Justin Erenkrantz] diff --git a/server/core.c b/server/core.c index 6848fd56cde..234de4af937 100644 --- a/server/core.c +++ b/server/core.c @@ -3798,7 +3798,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b) if (APR_BUCKET_IS_EOS(last_e)) { apr_bucket *bucket; int file_bucket_saved = 0; - APR_BUCKET_REMOVE(last_e); + apr_bucket_delete(last_e); for (bucket = APR_BRIGADE_FIRST(b); bucket != APR_BRIGADE_SENTINEL(b); bucket = APR_BUCKET_NEXT(bucket)) {