From 9ea88b518113929682bc1a866ce1a658ae9d48ad Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sun, 22 Jul 2018 19:12:18 +0900 Subject: [PATCH] wc_PKCS12_free, EVP_PKEY_free for PKCS12 in test_wolfSSL_OBJ --- tests/api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/api.c b/tests/api.c index d99710aeb..bafdf3b2e 100644 --- a/tests/api.c +++ b/tests/api.c @@ -18576,10 +18576,11 @@ static void test_wolfSSL_OBJ(void) AssertNotNull(p12 = d2i_PKCS12_fp(fp, NULL)); XFCLOSE(fp); AssertTrue((boolRet = PKCS12_parse(p12, "wolfSSL test", &pkey, &x509, NULL)) > 0); + wc_PKCS12_free(p12); + EVP_PKEY_free(pkey); AssertNotNull((x509Name = X509_get_issuer_name(x509)) != NULL); AssertIntNE((numNames = X509_NAME_entry_count(x509Name)), 0); AssertTrue((bio = BIO_new(BIO_s_mem())) != NULL); - for (j = 0; j < numNames; j++) { AssertNotNull(x509NameEntry = X509_NAME_get_entry(x509Name, j));