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:
@@ -353,13 +353,13 @@ dst_context_destroy(dst_context_t **dctxp) {
|
||||
REQUIRE(dctxp != NULL && VALID_CTX(*dctxp));
|
||||
|
||||
dctx = *dctxp;
|
||||
*dctxp = NULL;
|
||||
INSIST(dctx->key->func->destroyctx != NULL);
|
||||
dctx->key->func->destroyctx(dctx);
|
||||
if (dctx->key != NULL)
|
||||
dst_key_free(&dctx->key);
|
||||
dctx->magic = 0;
|
||||
isc_mem_putanddetach(&dctx->mctx, dctx, sizeof(dst_context_t));
|
||||
*dctxp = NULL;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
Reference in New Issue
Block a user