From 14d7f0eb486481badeea89bfa4b7a446479b4321 Mon Sep 17 00:00:00 2001 From: Remi Tricot-Le Breton Date: Mon, 9 Jan 2023 12:02:45 +0100 Subject: [PATCH] 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. --- src/ssl_ocsp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ssl_ocsp.c b/src/ssl_ocsp.c index 165c16c..4b1b659 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; } /* -- 1.7.10.4