]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Missing SSL session object freeing
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 4 Jun 2025 09:49:14 +0000 (11:49 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 6 Jun 2025 15:53:13 +0000 (17:53 +0200)
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.

src/quic_ssl.c

index 06075ef312802e6533fe97de91bfcfc3b9f5aba3..4b2cede1813d0a3497590dc8e06cfe744cc893b7 100644 (file)
@@ -1174,6 +1174,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;
 }