- Fix crash after reload where a stats lookup could reference old key

cache and neg cache structures.
This commit is contained in:
W.C.A. Wijngaards 2020-01-14 15:18:52 +01:00
parent 9b3f3101e3
commit 2c4be0c201
3 changed files with 18 additions and 12 deletions

View file

@ -3,6 +3,8 @@
because dnscrypt-proxy (2.0.36) does not support the test setup because dnscrypt-proxy (2.0.36) does not support the test setup
any more, and also the config file format does not seem to have any more, and also the config file format does not seem to have
the appropriate keys to recreate that setup. the appropriate keys to recreate that setup.
- Fix crash after reload where a stats lookup could reference old key
cache and neg cache structures.
10 January 2020: Wouter 10 January 2020: Wouter
- Fix the relationship between serve-expired and prefetch options, - Fix the relationship between serve-expired and prefetch options,

View file

@ -72,6 +72,8 @@ echo "$PRE/unbound-control -c ub.conf stats"
$PRE/unbound-control -c ub.conf stats > tmp.$$ $PRE/unbound-control -c ub.conf stats > tmp.$$
if test $? -ne 0; then if test $? -ne 0; then
echo "wrong exit value after success" echo "wrong exit value after success"
cat fwd.log
cat unbound.log
exit 1 exit 1
fi fi
if grep "^total.num.queries=[1-9][0-9]*$" tmp.$$; then if grep "^total.num.queries=[1-9][0-9]*$" tmp.$$; then

View file

@ -200,7 +200,9 @@ val_deinit(struct module_env* env, int id)
anchors_delete(env->anchors); anchors_delete(env->anchors);
env->anchors = NULL; env->anchors = NULL;
key_cache_delete(val_env->kcache); key_cache_delete(val_env->kcache);
env->key_cache = NULL;
neg_cache_delete(val_env->neg_cache); neg_cache_delete(val_env->neg_cache);
env->neg_cache = NULL;
free(val_env->nsec3_keysize); free(val_env->nsec3_keysize);
free(val_env->nsec3_maxiter); free(val_env->nsec3_maxiter);
free(val_env); free(val_env);