From: Mark Andrews Date: Mon, 26 Nov 2007 04:27:19 +0000 (+0000) Subject: 2265. [bug] Test that the memory context's basic_table is non NULL X-Git-Tag: v9.5.0~303 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=404df30f4fcbd318dd1e3cc027d2b5abff3ab6d5;p=thirdparty%2Fbind9.git 2265. [bug] Test that the memory context's basic_table is non NULL before freeing. [RT #17265] --- diff --git a/CHANGES b/CHANGES index 8540af619de..c349fbd5d92 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2265. [bug] Test that the memory context's basic_table is non NULL + before freeing. [RT #17265] + 2264. [bug] Server prefix length was being ignored. [RT #17308] 2263. [bug] "named-checkconf -z" failed to set default value diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 8251a50f5f0..36b9a7b0340 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.c,v 1.136 2007/10/30 23:30:09 marka Exp $ */ +/* $Id: mem.c,v 1.137 2007/11/26 04:27:19 marka Exp $ */ /*! \file */ @@ -907,7 +907,8 @@ destroy(isc_mem_t *ctx) { for (i = 0; i < ctx->basic_table_count; i++) (ctx->memfree)(ctx->arg, ctx->basic_table[i]); (ctx->memfree)(ctx->arg, ctx->freelists); - (ctx->memfree)(ctx->arg, ctx->basic_table); + if (ctx->basic_table != NULL) + (ctx->memfree)(ctx->arg, ctx->basic_table); } ondest = ctx->ondestroy;