From dec90b6caef758fe2890ee50db148cff6acffb90 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Thu, 21 Oct 1999 01:37:57 +0000 Subject: [PATCH] clean up from Bob's quick code walk-through --- lib/dns/adb.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/dns/adb.c b/lib/dns/adb.c index c252b35cb4..57d1fb45cb 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -1148,16 +1148,8 @@ dns_adb_lookup(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action, handle->name_bucket = bucket; ISC_LIST_APPEND(adbname->handles, handle, link); attach_to_task = ISC_TRUE; - } else { - /* - * We are done with this name, so release the lock - * here. Then, lock the adb itself, and add the - * handle to the list of handles given out. - */ - UNLOCK(&adb->namelocks[bucket]); - bucket = DNS_ADB_INVALIDBUCKET; } - + result = ISC_R_SUCCESS; goto out; } @@ -1200,8 +1192,10 @@ dns_adb_lookup(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action, * If the name isn't on a list it means we allocated it here, and it * should be killed. */ - if (adbname != NULL && !ISC_LINK_LINKED(adbname, link)) + if (adbname != NULL) { + INSIST(!ISC_LINK_LINKED(adbname, link)); free_adbname(adb, &adbname); + } /* * "goto out" if the handle will be returned to the caller. This