Skip to content

Commit

Permalink
Invoke tear_down when exiting test_encode_tls_sct() prematurely
Browse files Browse the repository at this point in the history
Fixes #24121

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24222)
  • Loading branch information
coolshrid authored and t8m committed Apr 23, 2024
1 parent 5454ef7 commit 264ff64
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/ct_test.c
Expand Up @@ -450,13 +450,18 @@ static int test_encode_tls_sct(void)

fixture->sct_list = sk_SCT_new_null();
if (fixture->sct_list == NULL)
return 0;
{
tear_down(fixture);
return 0;
}

if (!TEST_ptr(sct = SCT_new_from_base64(SCT_VERSION_V1, log_id,
CT_LOG_ENTRY_TYPE_X509, timestamp,
extensions, signature)))

{
tear_down(fixture);
return 0;
}

sk_SCT_push(fixture->sct_list, sct);
fixture->sct_dir = ct_dir;
Expand Down

0 comments on commit 264ff64

Please sign in to comment.