From: Yann Ylavic Date: Sun, 22 Nov 2020 22:37:43 +0000 (+0000) Subject: mod_case_filter_in: fix memory leak. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6944927d3fe2b00d30c8fed632ef6b16e4c7c172;p=thirdparty%2Fapache%2Fhttpd.git mod_case_filter_in: fix memory leak. Each ap_malloc()ed buffer should be free()d with its bucket. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883730 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); }