]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
mem_put/mem_get were inconsistent in updating ctx->malloced if ISC_MEM_CHECKOVERRUN...
authorMark Andrews <marka@isc.org>
Fri, 3 Feb 2017 01:39:35 +0000 (12:39 +1100)
committerMark Andrews <marka@isc.org>
Fri, 3 Feb 2017 01:39:35 +0000 (12:39 +1100)
lib/isc/mem.c

index c4cbf6e84056a6bf1af84833eee457b6be2ba820..9f6ee258a5f5729b347e11954aa6923f64b90a73 100644 (file)
@@ -827,6 +827,9 @@ mem_put(isc__mem_t *ctx, void *mem, size_t size) {
        memset(mem, 0xde, size); /* Mnemonic for "dead". */
 #endif
        (ctx->memfree)(ctx->arg, mem);
+#if ISC_MEM_CHECKOVERRUN
+       size += 1;
+#endif
        ctx->malloced -= size;
 }