]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fixup lameness cache memory accounting leak.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 3 Sep 2007 10:08:16 +0000 (10:08 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 3 Sep 2007 10:08:16 +0000 (10:08 +0000)
git-svn-id: file:///svn/unbound/trunk@578 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/cache/infra.c

index 994543292dad4c5b9f079585a9f203e73781377e..dde5d062a216f79e094415469639f63796180c1d 100644 (file)
@@ -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. 
index 6b2d5cea554464a76529fe4e385a2eda9e9b465a..b9ba761dbb5190d97e34d9397ce940f4792e684b 100644 (file)
@@ -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 */