From: Willy Tarreau Date: Wed, 27 Apr 2022 16:42:47 +0000 (+0200) Subject: CLEANUP: listeners/deinit: release accept queue tasklets on deinit X-Git-Tag: v2.6-dev8~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e01b08db6ab8e353e49c74e8ff27e4052b6a7a84;p=thirdparty%2Fhaproxy.git CLEANUP: listeners/deinit: release accept queue tasklets on deinit There was no function to release these ones, they were only created so the patch adds an accept_queue_deinit() call. --- diff --git a/src/listener.c b/src/listener.c index 721cc4117d..ad293545af 100644 --- a/src/listener.c +++ b/src/listener.c @@ -188,6 +188,18 @@ static int accept_queue_init() REGISTER_CONFIG_POSTPARSER("multi-threaded accept queue", accept_queue_init); +static void accept_queue_deinit() +{ + int i; + + for (i = 0; i < global.nbthread; i++) { + if (accept_queue_rings[i].tasklet) + tasklet_free(accept_queue_rings[i].tasklet); + } +} + +REGISTER_POST_DEINIT(accept_queue_deinit); + #endif // USE_THREAD /* Memory allocation and initialization of the per_thr field.