From c85c572206f43c3f39aba0c46223d5e8d9cfa0fa Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Wed, 22 Jan 2025 10:25:47 -0500 Subject: [PATCH] remove check of pending in ossl_quic_free MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Not strictly needed Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/26361) --- ssl/quic/quic_impl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 79bf0edc3c8..cade45de441 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -805,13 +805,7 @@ void ossl_quic_free(SSL *s) qc_cleanup(ctx.qc, /*have_lock=*/1); /* Note: SSL_free calls OPENSSL_free(qc) for us */ - /* - * Just because we have a listener doesn't mean we have a ref on it - * QUIC pre-creates user ssls to return to applications. - * Those don't hold a reference until they are accepted, so only drop - * the count if the application has accepted them - */ - if (ctx.qc->pending == 0 && ctx.qc->listener != NULL) + if (ctx.qc->listener != NULL) SSL_free(&ctx.qc->listener->obj.ssl); if (ctx.qc->domain != NULL) SSL_free(&ctx.qc->domain->obj.ssl); -- 2.47.2