From: Willy Tarreau Date: Wed, 27 Apr 2022 16:02:54 +0000 (+0200) Subject: CLEANUP: deinit: release the pre-check callbacks X-Git-Tag: v2.6-dev8~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65009ebde1dbbd734a6d7edb1f4593da732036e6;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index b43997b6c5..4ae694e8c2 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);