From 50984532e8851d7d36491d953236aebcf78255e3 Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Wed, 4 Jun 2025 11:49:14 +0200 Subject: [PATCH] BUG/MINOR: quic: Missing SSL session object freeing qc_alloc_ssl_sock_ctx() allocates an SSL_CTX object for each connection. It also allocates an SSL object. When this function failed, it freed only the SSL_CTX object. The correct way to free both of them is to call qc_free_ssl_sock_ctx(). Must be backported as far as 2.6. (cherry picked from commit 6b746330692380f7e88fc757b7124b5a9c88ebd8) Signed-off-by: Christopher Faulet (cherry picked from commit aaef9e0000fb2fc6011d9a95e6e7f5241863db8f) Signed-off-by: Christopher Faulet (cherry picked from commit 3ba302684fcc346ed02c3892335f5ab9e8bceeb8) Signed-off-by: Christopher Faulet --- src/quic_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quic_ssl.c b/src/quic_ssl.c index d6b4834..a6a54a9 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -871,6 +871,6 @@ int qc_alloc_ssl_sock_ctx(struct quic_conn *qc) err: TRACE_DEVEL("leaving on error", QUIC_EV_CONN_NEW, qc); - pool_free(pool_head_quic_ssl_sock_ctx, ctx); + qc_free_ssl_sock_ctx(&ctx); goto leave; } -- 1.7.10.4