]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: resolvers: Don't defer resolutions release in deinit function
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 May 2022 16:10:42 +0000 (18:10 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 May 2022 16:11:59 +0000 (18:11 +0200)
commit4315d17d3fbcfd1074ff05fed1eec01d0fc89805
tree013bbdab89afa1eab28609229dff73f6f734e37b
parent1ba30167a029883badfb8fa8dd0fe0239d9a9237
BUG/MEDIUM: resolvers: Don't defer resolutions release in deinit function

resolvers_deinit() function is called on error, during post-parsing stage,
or on deinit, when HAProxy is stopped. It releases all entities: resolvers,
resolutions and SRV requests. There is no reason to defer the resolutions
release by moving them in the death_row list because this function is
terminal. And it is in fact a bug. Resolutions must not be released at the
end of the function because resolvers were already freed. However some
resolutions may still be attached to a reolver. Thus, when we try to remove
it from the resolver's tree, in resolv_reset_resolution(), this resolver was
already released.

So now, resolution are immediately released. It means there is no more
reason to track this function. calls to
enter_resolver_code()/leave_resolver_code() have been removed.

This patch should fix the issue #1680 and may be related to #1485. It must
be backported as far as 2.2.
src/resolvers.c