]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: memory: use pool_destroy_all() to destroy all pools on deinit()
authorWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2018 14:57:34 +0000 (15:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2018 18:50:32 +0000 (19:50 +0100)
commit2455cebe00cf9027ed79aa7ed2c94129646c9101
treed31aa54563d4d908517a30aa027a8225ad2ca196
parent8ceae72d44e08b61190ca2daba211b0b198b0f03
MEDIUM: memory: use pool_destroy_all() to destroy all pools on deinit()

Instead of exporting a number of pools and having to manually delete
them in deinit() or to have dedicated destructors to remove them, let's
simply kill all pools on deinit().

For this a new function pool_destroy_all() was introduced. As its name
implies, it destroys and frees all pools (provided they don't have any
user anymore of course).

This allowed to remove 4 implicit destructors, 2 explicit ones, and 11
individual calls to pool_destroy(). In addition it properly removes
the mux_pt_ctx pool which was not cleared on exit (no backport needed
here since it's 1.9 only). The sig_handler pool doesn't need to be
exported anymore and became static now.
14 files changed:
include/common/buffer.h
include/common/chunk.h
include/common/memory.h
include/proto/signal.h
src/buffer.c
src/chunk.c
src/dns.c
src/filters.c
src/flt_spoe.c
src/haproxy.c
src/memory.c
src/mux_h1.c
src/mux_h2.c
src/signal.c