From ab143fd1f8a9fe797d3ae831c8a245556fc1a350 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Mon, 3 Sep 2007 10:08:16 +0000 Subject: [PATCH] fixup lameness cache memory accounting leak. git-svn-id: file:///svn/unbound/trunk@578 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 2 ++ services/cache/infra.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 994543292..dde5d062a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,8 @@ with both a CNAME and the NXDOMAIN rcode. Added a test that the rcode is changed to NOERROR (because of the CNAME). - timeout on tcp does not lead to spurious leakage detect. + - account memory for name of lame zones, so that memory leakages does + not show lame cache growth as a leakage growth. 31 August 2007: Wouter - can read bind trusted-keys { ... }; files, in a compatibility mode. diff --git a/services/cache/infra.c b/services/cache/infra.c index 6b2d5cea5..b9ba761db 100644 --- a/services/cache/infra.c +++ b/services/cache/infra.c @@ -297,7 +297,7 @@ infra_lame_sizefunc(void* k, void* ATTR_UNUSED(d)) { struct infra_lame_key* key = (struct infra_lame_key*)k; return sizeof(*key) + sizeof(struct infra_lame_data) - + lock_get_mem(&key->entry.lock); + + key->namelen + lock_get_mem(&key->entry.lock); } /** compare zone names, returns -1, 0, +1 */ -- 2.47.2