]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test_tlsext_status_type(): Avoid leaking of previously allocated data
authorTomas Mraz <tomas@openssl.org>
Mon, 28 Jul 2025 08:55:45 +0000 (10:55 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 30 Jul 2025 16:29:33 +0000 (18:29 +0200)
Fixes Coverity 165922616592241659223

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28105)

test/sslapitest.c

index 216bb1b9ed0b780aab9bc9c9f8114340ec15cc6a..d4450b01d49f1a2ecd685d3c2dca9dffd13c514f 100644 (file)
@@ -1984,7 +1984,7 @@ static int test_tlsext_status_type(void)
     if (!create_ssl_ctx_pair(libctx, TLS_server_method(), TLS_client_method(),
                              TLS1_VERSION, 0,
                              &sctx, &cctx, leaf, skey))
-        return 0;
+        goto end;
     if (SSL_CTX_use_certificate_chain_file(sctx, leaf_chain) <= 0)
         goto end;
     if (SSL_CTX_get_tlsext_status_type(cctx) != -1)