From: Pauli Date: Thu, 18 Mar 2021 04:08:06 +0000 (+1000) Subject: test: fix Coverity 1454818: use after free X-Git-Tag: openssl-3.0.0-alpha14~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39f6bf33e5852be55b126c3fcc56e3ef5ab1a584;p=thirdparty%2Fopenssl.git test: fix Coverity 1454818: use after free Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/14597) --- diff --git a/test/cipherlist_test.c b/test/cipherlist_test.c index 380f0727fc5..9739cb58c49 100644 --- a/test/cipherlist_test.c +++ b/test/cipherlist_test.c @@ -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; }