From 80bd93ea22aec00909d9ee0f2ea64c78460bce32 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 26 Nov 2007 04:32:14 +0000 Subject: [PATCH] 2265. [bug] Test that the memory context's basic_table is non NULL before freeing. [RT #17265] --- CHANGES | 3 +++ lib/isc/mem.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d8c4b2d292..390f88df4d 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 aec6118252..5ef7ee03e8 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.c,v 1.116.18.18 2007/10/30 23:31:43 marka Exp $ */ +/* $Id: mem.c,v 1.116.18.19 2007/11/26 04:30:47 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;