Skip to content

Commit

Permalink
test/cmp_vfy_test.c: free before return
Browse files Browse the repository at this point in the history
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #17279)

(cherry picked from commit 869b7dd)
  • Loading branch information
PeiweiHu authored and t8m committed Dec 17, 2021
1 parent 699dcc5 commit e7d55e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/cmp_vfy_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ static time_t test_time_valid = 0, test_time_after_expiration = 0;

static CMP_VFY_TEST_FIXTURE *set_up(const char *const test_case_name)
{
X509_STORE *ts = X509_STORE_new();
X509_STORE *ts;
CMP_VFY_TEST_FIXTURE *fixture;

if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
return NULL;

ts = X509_STORE_new();
fixture->test_case_name = test_case_name;
if (ts == NULL
|| !TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL))
Expand Down

0 comments on commit e7d55e3

Please sign in to comment.