From: Mark Andrews Date: Thu, 28 Feb 2013 02:14:52 +0000 (+1100) Subject: check the returns from isc_task_beginexclusive X-Git-Tag: v9.10.0a1~463^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3426bd337df23a83c1e9b45184600edfd056c667;p=thirdparty%2Fbind9.git check the returns from isc_task_beginexclusive --- diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 7e3eced0c01..c5aa29d67a4 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -539,7 +539,9 @@ grow_entries(isc_task_t *task, isc_event_t *ev) { isc_event_free(&ev); - isc_task_beginexclusive(task); + result = isc_task_beginexclusive(task); + if (result != ISC_R_SUCCESS) + goto check_exit; i = 0; while (nbuckets[i] != 0 && adb->nentries >= nbuckets[i]) @@ -669,6 +671,7 @@ grow_entries(isc_task_t *task, isc_event_t *ev) { done: isc_task_endexclusive(task); + check_exit: LOCK(&adb->lock); if (dec_adb_irefcnt(adb)) check_exit(adb); @@ -693,7 +696,9 @@ grow_names(isc_task_t *task, isc_event_t *ev) { isc_event_free(&ev); - isc_task_beginexclusive(task); + result = isc_task_beginexclusive(task); + if (result != ISC_R_SUCCESS) + goto check_exit; i = 0; while (nbuckets[i] != 0 && adb->nnames >= nbuckets[i]) @@ -819,6 +824,7 @@ grow_names(isc_task_t *task, isc_event_t *ev) { done: isc_task_endexclusive(task); + check_exit: LOCK(&adb->lock); if (dec_adb_irefcnt(adb)) check_exit(adb);