From: Neil Horman Date: Wed, 22 Jan 2025 15:25:47 +0000 (-0500) Subject: remove check of pending in ossl_quic_free X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fde47d8f3ce966cab6db1232ea100d9609df997;p=thirdparty%2Fopenssl.git remove check of pending in ossl_quic_free 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) --- 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);