From 734abf932385fdcb45613b7da28a5c7cb9184494 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 1 Nov 2007 09:48:20 +0000 Subject: [PATCH] Fixup of reload bug. git-svn-id: file:///svn/unbound/trunk@726 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 4 ++++ iterator/iterator.c | 1 + validator/validator.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 6942f1691..d9158f2a7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +1 November 2007: Wouter + - Fixup of crash on reload, due to anchors in env not NULLed after + dealloc during deinit. + 31 October 2007: Wouter - cache-max-ttl config option. - building outside sourcedir works again. diff --git a/iterator/iterator.c b/iterator/iterator.c index 48baf653a..5f33e7d0d 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -88,6 +88,7 @@ iter_deinit(struct module_env* env, int id) forwards_delete(iter_env->fwds); donotq_delete(iter_env->donotq); free(iter_env); + env->modinfo[id] = NULL; } /** new query for iterator */ diff --git a/validator/validator.c b/validator/validator.c index ac4f6275c..920f3d83c 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -162,10 +162,12 @@ val_deinit(struct module_env* env, int id) return; val_env = (struct val_env*)env->modinfo[id]; anchors_delete(env->anchors); + env->anchors = NULL; key_cache_delete(val_env->kcache); free(val_env->nsec3_keysize); free(val_env->nsec3_maxiter); free(val_env); + env->modinfo[id] = NULL; } /** allocate new validator query state */