From: Mounir IDRASSI Date: Mon, 27 Jul 2026 13:39:53 +0000 (+0900) Subject: quic: fix BIO ownership in test helper X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4dcfebcead9fdab6a220bce12025cc8ca87b265;p=thirdparty%2Fopenssl.git quic: fix BIO ownership in test helper SSL_set_bio() transfers ownership of cbio to the client SSL object. Clear the local pointer after the handoff so the error path does not release an SSL-owned reference before SSL_free(). Fixes #32084 Reviewed-by: Saša Nedvědický Reviewed-by: Daniel Kubec MergeDate: Wed Jul 29 09:55:13 2026 (Merged from https://github.com/openssl/openssl/pull/32086) --- diff --git a/test/helpers/quictestlib.c b/test/helpers/quictestlib.c index 5405df6ebf3..29508dcfd6e 100644 --- a/test/helpers/quictestlib.c +++ b/test/helpers/quictestlib.c @@ -311,6 +311,8 @@ int qtest_create_quic_objects(OSSL_LIB_CTX *libctx, SSL_CTX *clientctx, } SSL_set_bio(*cssl, cbio, cbio); + /* Ownership of cbio is now held by *cssl */ + cbio = NULL; if (!TEST_true(SSL_set_blocking_mode(*cssl, (flags & QTEST_FLAG_BLOCK) != 0 ? 1 : 0)))