From: Remi Tricot-Le Breton Date: Mon, 9 Jan 2023 11:02:45 +0000 (+0100) Subject: MINOR: ssl: Release ssl_ocsp_task_ctx.cur_ocsp when destroying task X-Git-Tag: v2.8-dev2~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14d7f0eb486481badeea89bfa4b7a446479b4321;p=thirdparty%2Fhaproxy.git MINOR: ssl: Release ssl_ocsp_task_ctx.cur_ocsp when destroying task In the unlikely event that the OCSP udpate task is killed in the middle of an update process (request sent but no response received yet) the cur_ocsp member of the update context would keep an unneeded reference to a certificate_ocsp object. It must then be freed during the task's cleanup. --- diff --git a/src/ssl_ocsp.c b/src/ssl_ocsp.c index 165c16ca93..4b1b65961f 100644 --- a/src/ssl_ocsp.c +++ b/src/ssl_ocsp.c @@ -840,6 +840,9 @@ void ssl_destroy_ocsp_update_task(void) task_destroy(ocsp_update_task); ocsp_update_task = NULL; + + ssl_sock_free_ocsp(ssl_ocsp_task_ctx.cur_ocsp); + ssl_ocsp_task_ctx.cur_ocsp = NULL; } /*