From: Yann Ylavic Date: Tue, 5 Jan 2021 10:26:40 +0000 (+0000) Subject: Merge r1883730 from trunk: X-Git-Tag: 2.4.47~184 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1147de3b279cc5c86e2e1144d53510fb933ac515;p=thirdparty%2Fapache%2Fhttpd.git Merge r1883730 from trunk: mod_case_filter_in: fix memory leak. Each ap_malloc()ed buffer should be free()d with its bucket. Submitted by: ylavic Reviewed by: ylavic, jorton, covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885140 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/examples/mod_case_filter_in.c b/modules/examples/mod_case_filter_in.c index 5116e3b9f62..c70a9eb9e6c 100644 --- a/modules/examples/mod_case_filter_in.c +++ b/modules/examples/mod_case_filter_in.c @@ -114,7 +114,7 @@ static apr_status_t CaseFilterInFilter(ap_filter_t *f, buf[n] = apr_toupper(data[n]); } - pbktOut = apr_bucket_heap_create(buf, len, 0, c->bucket_alloc); + pbktOut = apr_bucket_heap_create(buf, len, free, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(pbbOut, pbktOut); apr_bucket_delete(pbktIn); }