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

ctx->checkfree was only being initialized if USE_INTERNAL_MALLOC was on.

This commit is contained in:
Brian Wellington
2001-02-05 23:48:25 +00:00
parent ae73c78406
commit 770d3b36da

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: mem.c,v 1.80 2001/01/25 01:38:01 neild Exp $ */ /* $Id: mem.c,v 1.81 2001/02/05 23:48:25 bwelling Exp $ */
#include <config.h> #include <config.h>
@@ -767,6 +767,7 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
ctx->memfree = memfree; ctx->memfree = memfree;
ctx->arg = arg; ctx->arg = arg;
ctx->stats = NULL; ctx->stats = NULL;
ctx->checkfree = ISC_TRUE;
ISC_LIST_INIT(ctx->pools); ISC_LIST_INIT(ctx->pools);
#if ISC_MEM_USE_INTERNAL_MALLOC #if ISC_MEM_USE_INTERNAL_MALLOC
@@ -791,7 +792,6 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
result = ISC_R_NOMEMORY; result = ISC_R_NOMEMORY;
goto error; goto error;
} }
ctx->checkfree = ISC_TRUE;
ctx->trysplit = ISC_FALSE; ctx->trysplit = ISC_FALSE;
memset(ctx->freelists, 0, memset(ctx->freelists, 0,
ctx->max_size * sizeof (element *)); ctx->max_size * sizeof (element *));