mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Unlink the query under cleanup_query
In the cleanup code of fctx_query() function there is a code path
where 'query' is linked to 'fctx' and it is being destroyed.
Make sure that 'query' is unlinked before destroying it.
(cherry picked from commit ac889684c7)
This commit is contained in:
parent
b55f4068ff
commit
4a311b9bb4
1 changed files with 6 additions and 0 deletions
|
|
@ -2298,6 +2298,12 @@ cleanup_dispatch:
|
|||
}
|
||||
|
||||
cleanup_query:
|
||||
LOCK(&res->buckets[fctx->bucketnum].lock);
|
||||
if (ISC_LINK_LINKED(query, link)) {
|
||||
atomic_fetch_sub_release(&fctx->nqueries, 1);
|
||||
ISC_LIST_UNLINK(fctx->queries, query, link);
|
||||
}
|
||||
UNLOCK(&res->buckets[fctx->bucketnum].lock);
|
||||
|
||||
query->magic = 0;
|
||||
dns_message_detach(&query->rmessage);
|
||||
|
|
|
|||
Loading…
Reference in a new issue