From: Amaury Denoyelle Date: Thu, 20 Jan 2022 16:43:20 +0000 (+0100) Subject: MINOR: quic: free SSL context on quic_conn free X-Git-Tag: v2.6-dev1~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d9794b03a2045c67d9af257839fc4a82c973baa;p=thirdparty%2Fhaproxy.git MINOR: quic: free SSL context on quic_conn free Free the SSL context attached to the quic_conn when freeing the connection. This fixes a memory leak for every QUIC connection. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 21cff9cf71..13fc2a15f9 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -3389,8 +3389,10 @@ static void quic_conn_drop(struct quic_conn *qc) return; conn_ctx = HA_ATOMIC_LOAD(&qc->xprt_ctx); - if (conn_ctx) + if (conn_ctx) { + SSL_free(conn_ctx->ssl); pool_free(pool_head_quic_conn_ctx, conn_ctx); + } for (i = 0; i < QUIC_TLS_ENC_LEVEL_MAX; i++) quic_conn_enc_level_uninit(&qc->els[i]);