]> git.ipfire.org Git - thirdparty/bind9.git/commit
Remove resolver.c:maybe_destroy()
authorAram Sargsyan <aram@isc.org>
Wed, 15 Jun 2022 10:27:41 +0000 (10:27 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 30 Jun 2022 19:12:17 +0000 (19:12 +0000)
commit61d77affdd39a352de5f386dc08818174fbaa781
treefe602afb0c897898b99de14de4b42f6b4360c62a
parent058a2e7d4437f383c5cda3a44921e49ad272f9fb
Remove resolver.c:maybe_destroy()

After refactoring of `validated()`, the `maybe_destroy()` function is
no longer expected to actually destroy the fetch context when it is
being called, so effectively it only ensures that the validators are
canceled when the context has no more queries and pending events, but
that is redundant, because `maybe_destroy()` `REQUIRE`s that the context
should be in the shutting down state, and the function which sets that
state is already canceling the validators in its own turn.

As a failsafe, to make sure that no validators will be created after
`fctx_doshutdown()` is called, add an early return from `valcreate()` if
the context is in the shutting down state.
lib/dns/resolver.c