From 65009ebde1dbbd734a6d7edb1f4593da732036e6 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 27 Apr 2022 18:02:54 +0200 Subject: [PATCH] CLEANUP: deinit: release the pre-check callbacks The freeing of pre-check callbacks was missing when this feature was recently added with commit b53eb8790 ("MINOR: init: add the pre-check callback"), let's do it to make valgrind happy. --- src/haproxy.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index b43997b6c..4ae694e8c 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2557,6 +2557,7 @@ void deinit(void) struct post_server_check_fct *pscf, *pscfb; struct post_check_fct *pcf, *pcfb; struct post_proxy_check_fct *ppcf, *ppcfb; + struct pre_check_fct *prcf, *prcfb; int cur_fd; /* At this point the listeners state is weird: @@ -2712,6 +2713,11 @@ void deinit(void) free(ppcf); } + list_for_each_entry_safe(prcf, prcfb, &pre_check_list, list) { + LIST_DELETE(&prcf->list); + free(prcf); + } + list_for_each_entry_safe(tif, tifb, &per_thread_init_list, list) { LIST_DELETE(&tif->list); free(tif); -- 2.47.3