summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-04-22 16:00:14 +0200
committerMartin Nagy <mnagy@redhat.com>2009-04-22 16:00:14 +0200
commit63a5f5fe2c2f83cd8a52328dd936f4a5969e6494 (patch)
treea514f42980fd6069a50984c4a3b72a407b3b737a
parent1c5e11063e71024f08c087ebc8bbddf7044b831e (diff)
downloadbind_dynamic-63a5f5fe2c2f83cd8a52328dd936f4a5969e6494.tar.gz
bind_dynamic-63a5f5fe2c2f83cd8a52328dd936f4a5969e6494.tar.xz
bind_dynamic-63a5f5fe2c2f83cd8a52328dd936f4a5969e6494.zip
Unload plug-ins from last to first.
-rw-r--r--lib/dns/dynamic_db.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/dns/dynamic_db.c b/lib/dns/dynamic_db.c
index 5dc9644..de2daf7 100644
--- a/lib/dns/dynamic_db.c
+++ b/lib/dns/dynamic_db.c
@@ -229,18 +229,18 @@ void
dns_dynamic_db_cleanup(isc_boolean_t exiting)
{
dyndb_implementation_t *elem;
- dyndb_implementation_t *next;
+ dyndb_implementation_t *prev;
RUNTIME_CHECK(isc_once_do(&once, dyndb_initialize) == ISC_R_SUCCESS);
LOCK(&dyndb_lock);
- elem = HEAD(dyndb_implementations);
+ elem = TAIL(dyndb_implementations);
while (elem != NULL) {
- next = NEXT(elem, link);
+ prev = PREV(elem, link);
UNLINK(dyndb_implementations, elem, link);
elem->destroy_function();
unload_library(&elem);
- elem = next;
+ elem = prev;
}
UNLOCK(&dyndb_lock);