2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[master] fix 'total use' accounting

4046.   [bug]           Accounting of "total use" in memory context
                        statistics was not correct. [RT #38370]
This commit is contained in:
Evan Hunt
2015-01-22 09:44:24 -08:00
parent f885a6172e
commit 84ee90b52d
5 changed files with 174 additions and 6 deletions

View File

@@ -741,9 +741,8 @@ mem_putunlocked(isc__mem_t *ctx, void *mem, size_t size) {
(ctx->memfree)(ctx->arg, mem);
INSIST(ctx->stats[ctx->max_size].gets != 0U);
ctx->stats[ctx->max_size].gets--;
INSIST(size <= ctx->total);
INSIST(size <= ctx->inuse);
ctx->inuse -= size;
ctx->total -= size;
return;
}