Always check the return from isc_refcount_decrement.

Created isc_refcount_decrement_expect macro to test conditionally
the return value to ensure it is in expected range.  Converted
unchecked isc_refcount_decrement to use isc_refcount_decrement_expect.
Converted INSIST(isc_refcount_decrement()...) to isc_refcount_decrement_expect.
This commit is contained in:
Mark Andrews
2019-12-05 13:29:45 +11:00
parent 92059fc7db
commit bde5c7632a
16 changed files with 47 additions and 31 deletions

View File

@@ -314,10 +314,10 @@ cleanup_dynkeys:
}
cleanup_weakrefs:
isc_refcount_decrement(&view->weakrefs);
isc_refcount_decrementz(&view->weakrefs);
isc_refcount_destroy(&view->weakrefs);
isc_refcount_decrement(&view->references);
isc_refcount_decrementz(&view->references);
isc_refcount_destroy(&view->references);
if (view->fwdtable != NULL) {