From: Wouter Wijngaards Date: Fri, 2 Feb 2018 11:08:50 +0000 (+0000) Subject: Fix more critical regions. Cleans tests. X-Git-Tag: release-1.7.0rc1~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b02f855df862de389c60722f7e802c350cf207ba;p=thirdparty%2Funbound.git Fix more critical regions. Cleans tests. git-svn-id: file:///svn/unbound/trunk@4498 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/edns-subnet/subnetmod.c b/edns-subnet/subnetmod.c index bea59ebf5..ae2523b86 100644 --- a/edns-subnet/subnetmod.c +++ b/edns-subnet/subnetmod.c @@ -353,7 +353,9 @@ update_cache(struct module_qstate *qstate, int id) log_err("Subnet cache insertion failed"); return; } + lock_quick_lock(&sne->alloc.lock); rep = reply_info_copy(qstate->return_msg->rep, &sne->alloc, NULL); + lock_quick_unlock(&sne->alloc.lock); if (!rep) { if (acquired_lock) lock_rw_unlock(&lru_entry->lock); log_err("Subnet cache insertion failed");