Invalid reference counting
I found couple more places where .references == 0
means something else than DEAD, DON'T USE.
-
lib/dns/cache.c
, the extra condition iscache->live_tasks > 0
-
lib/dns/zone.c
, the extra condition isDNS_ZONE_FLAG(zone, DNS_ZONEFLG_SHUTDOWN) && isc_refcount_current(&zone->irefs) == 0)
-
lib/dns/resolver.c
, the extra condition isfctx->pending == 0 && fctx->nqueries == 0 && ISC_LIST_EMPTY(fctx->validators))
-
lib/isc/task.c
, the extra condition isEMPTY(task->events) && !TASK_SHUTTINGDOWN(task)
-
lib/ns/client.c
, the extra condition isclient->nsends == 0 && client->nrecvs == 0
andclient->mortal && TCP_CLIENT(client) && client->newstate != NS_CLIENTSTATE_FREED && (client->sctx->options & NS_SERVER_CLIENTTEST) == 0
I am leaving lib/dns/rbtdb.c
out of the list on purpose, but git grep "isc_refcount_current([^)]*) == 0"
reveals all the places...