From: Graham Leggett Date: Tue, 26 Sep 2006 14:56:01 +0000 (+0000) Subject: Memory leak fix: Unconditionally free the buffer. X-Git-Tag: 2.3.0~2119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed5062c084c0587839389a207026c70663f6b5a;p=thirdparty%2Fapache%2Fhttpd.git Memory leak fix: Unconditionally free the buffer. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@450070 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3ebe4063422..5db1cb00e9f 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.3.0 [Remove entries to the current 2.0 and 2.2 section below, when backported] + *) mod_mem_cache: Memory leak fix: Unconditionally free the buffer. + [Davi Arnaut ] + *) mod_cache: From RFC3986 (section 6.2.3.) if a URI contains an authority component and an empty path, the empty path is to be equivalent to "/". It explicitly cites the following four URIs as equivalents: diff --git a/modules/cache/mod_mem_cache.c b/modules/cache/mod_mem_cache.c index 5842cc41649..63d8eb66638 100644 --- a/modules/cache/mod_mem_cache.c +++ b/modules/cache/mod_mem_cache.c @@ -225,7 +225,7 @@ static void cleanup_cache_object(cache_object_t *obj) /* Cleanup the mem_cache_object_t */ if (mobj) { - if (mobj->type == CACHE_TYPE_HEAP && mobj->m) { + if (mobj->m) { free(mobj->m); } if (mobj->type == CACHE_TYPE_FILE && mobj->fd) {