From 5de7a34fd432e99f0e9b0761c5c699894c26df36 Mon Sep 17 00:00:00 2001 From: Go Hosohara Date: Mon, 16 Jul 2018 17:19:17 +0900 Subject: [PATCH] Add memory free to prevent from leaking --- tests/api.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/api.c b/tests/api.c index 157e57cd1..03d3b96d4 100644 --- a/tests/api.c +++ b/tests/api.c @@ -18560,7 +18560,11 @@ static void test_wolfSSL_OBJ(void) AssertNotNull(asn1Name = X509_NAME_ENTRY_get_object(x509NameEntry)); AssertTrue((nid = OBJ_obj2nid(asn1Name)) > 0); printf("nid=%d\n", nid); + ASN1_OBJECT_free(asn1Name); } + BIO_free(bio); + X509_free(x509); + XFCLOSE(fp); } for (i = 0; p12_f[i] != NULL; i++) @@ -18578,7 +18582,11 @@ static void test_wolfSSL_OBJ(void) AssertNotNull(asn1Name = X509_NAME_ENTRY_get_object(x509NameEntry)); AssertTrue((nid = OBJ_obj2nid(asn1Name)) > 0); printf("nid=%d\n", nid); + ASN1_OBJECT_free(asn1Name); } + BIO_free(bio); + X509_free(x509); + XFCLOSE(fp); } printf(resultFmt, passed);