]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: lb-chash: free lb_nodes from chash's deinit(), not global
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Feb 2026 05:49:24 +0000 (06:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Feb 2026 06:20:50 +0000 (07:20 +0100)
commit62239539bff7424e2548ac72d94fbf617dc4bee8
tree53642d4ead95c3398bfb3b3428f6ec7e726d01fe
parent91a5b67b25d2f3ef1f041841c0d9ab7e2a061cfc
CLEANUP: lb-chash: free lb_nodes from chash's deinit(), not global

There's an ambuity on the ownership of lb_nodes in chash, it's allocated
by chash but freed by the server code in srv_free_params() from srv_drop()
upon deinit. Let's move this free() call to a chash-specific function
which will own the responsibility for doing this instead. Note that
the .server_deinit() callback is properly called both on proxy being
taken down and on server deletion.
src/lb_chash.c
src/server.c