mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
cmp: add null pointer check in tear_down test function
problem reported by: 2ourc3 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22355)
This commit is contained in:
parent
008ca01e50
commit
91a5c0e40c
@ -38,15 +38,17 @@ static OSSL_PROVIDER *default_null_provider = NULL, *provider = NULL;
|
||||
|
||||
static void tear_down(CMP_PROTECT_TEST_FIXTURE *fixture)
|
||||
{
|
||||
OSSL_CMP_CTX_free(fixture->cmp_ctx);
|
||||
OSSL_CMP_MSG_free(fixture->msg);
|
||||
OSSL_CMP_PKISI_free(fixture->si);
|
||||
if (fixture != NULL) {
|
||||
OSSL_CMP_CTX_free(fixture->cmp_ctx);
|
||||
OSSL_CMP_MSG_free(fixture->msg);
|
||||
OSSL_CMP_PKISI_free(fixture->si);
|
||||
|
||||
OPENSSL_free(fixture->mem);
|
||||
sk_X509_free(fixture->certs);
|
||||
sk_X509_free(fixture->chain);
|
||||
OPENSSL_free(fixture->mem);
|
||||
sk_X509_free(fixture->certs);
|
||||
sk_X509_free(fixture->chain);
|
||||
|
||||
OPENSSL_free(fixture);
|
||||
OPENSSL_free(fixture);
|
||||
}
|
||||
}
|
||||
|
||||
static CMP_PROTECT_TEST_FIXTURE *set_up(const char *const test_case_name)
|
||||
|
Loading…
Reference in New Issue
Block a user