summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-03-18 14:08:06 +1000
committerPauli <ppzgs1@gmail.com>2021-03-19 19:51:37 +1000
commit39f6bf33e5852be55b126c3fcc56e3ef5ab1a584 (patch)
tree71cd3cdb297973c504f1f1e8e9af9febde4d0171 /test
parentebdb5cccde44d3d1a17b4284b2b6e0ed39a71faf (diff)
downloadopenssl-new-39f6bf33e5852be55b126c3fcc56e3ef5ab1a584.tar.gz
test: fix Coverity 1454818: use after free
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14597)
Diffstat (limited to 'test')
-rw-r--r--test/cipherlist_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cipherlist_test.c b/test/cipherlist_test.c
index 380f0727fc..9739cb58c4 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;
}