test: fix Coverity 1454818: use after free

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14597)
This commit is contained in:
Pauli 2021-03-18 14:08:06 +10:00
parent ebdb5cccde
commit 39f6bf33e5

View File

@ -205,8 +205,10 @@ static int test_default_cipherlist_explicit(void)
{
SETUP_CIPHERLIST_TEST_FIXTURE();
if (!TEST_true(SSL_CTX_set_cipher_list(fixture->server, "DEFAULT"))
|| !TEST_true(SSL_CTX_set_cipher_list(fixture->client, "DEFAULT")))
|| !TEST_true(SSL_CTX_set_cipher_list(fixture->client, "DEFAULT"))) {
tear_down(fixture);
fixture = NULL;
}
EXECUTE_CIPHERLIST_TEST();
return result;
}