2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Clear the pointer to destroyed object early using the semantic patch

Also disable the semantic patch as the code needs tweaks here and there because
some destroy functions might not destroy the object and return early if the
object is still in use.
This commit is contained in:
Ondřej Surý
2020-02-08 04:37:54 -08:00
parent b97d003033
commit bc1d4c9cb4
64 changed files with 94 additions and 144 deletions

View File

@@ -1317,9 +1317,8 @@ dns_dumpctx_detach(dns_dumpctx_t **dctxp) {
REQUIRE(dctxp != NULL);
dctx = *dctxp;
REQUIRE(DNS_DCTX_VALID(dctx));
*dctxp = NULL;
REQUIRE(DNS_DCTX_VALID(dctx));
if (isc_refcount_decrement(&dctx->references) == 1) {
dumpctx_destroy(dctx);