mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
sigh. do not set the lock from node->locknum until being sure node is not null
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rbtdb.c,v 1.158 2001/04/20 14:35:04 tale Exp $ */
|
/* $Id: rbtdb.c,v 1.159 2001/04/20 21:22:09 tale Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Principal Author: Bob Halley
|
* Principal Author: Bob Halley
|
||||||
@@ -4616,11 +4616,12 @@ static inline void
|
|||||||
dereference_iter_node(rbtdb_dbiterator_t *rbtdbiter) {
|
dereference_iter_node(rbtdb_dbiterator_t *rbtdbiter) {
|
||||||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db;
|
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)rbtdbiter->common.db;
|
||||||
dns_rbtnode_t *node = rbtdbiter->node;
|
dns_rbtnode_t *node = rbtdbiter->node;
|
||||||
isc_mutex_t *lock = &rbtdb->node_locks[node->locknum].lock;
|
isc_mutex_t *lock;
|
||||||
|
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
lock = &rbtdb->node_locks[node->locknum].lock;
|
||||||
LOCK(lock);
|
LOCK(lock);
|
||||||
INSIST(rbtdbiter->node->references > 0);
|
INSIST(rbtdbiter->node->references > 0);
|
||||||
if (--node->references == 0)
|
if (--node->references == 0)
|
||||||
|
Reference in New Issue
Block a user