mem_put/mem_get were inconsistent in updating ctx->malloced if ISC_MEM_CHECKOVERRUN was defined

This commit is contained in:
Mark Andrews 2017-02-03 12:39:35 +11:00
parent 04241eba68
commit 4a85cab586

View 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;
}