mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-24 23:57:30 -04:00
Searching catzs->zones requires a read lock
Lock the catzs->lock mutex before searching in the catzs->zones
hash table.
(cherry picked from commit 0ef0c86632)
This commit is contained in:
parent
a719647023
commit
00569f62b3
1 changed files with 2 additions and 0 deletions
|
|
@ -890,8 +890,10 @@ dns_catz_get_zone(dns_catz_zones_t *catzs, const dns_name_t *name) {
|
|||
REQUIRE(DNS_CATZ_ZONES_VALID(catzs));
|
||||
REQUIRE(ISC_MAGIC_VALID(name, DNS_NAME_MAGIC));
|
||||
|
||||
LOCK(&catzs->lock);
|
||||
result = isc_ht_find(catzs->zones, name->ndata, name->length,
|
||||
(void **)&found);
|
||||
UNLOCK(&catzs->lock);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue