From 65cfef53375c06eb137597cf06d773b7a30a4f62 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 27 Aug 2021 14:10:06 -0600 Subject: [PATCH] fix for free with test case --- tests/api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/api.c b/tests/api.c index a34a1151a..2b2748b97 100644 --- a/tests/api.c +++ b/tests/api.c @@ -27897,6 +27897,8 @@ static void test_wolfSSL_certs(void) asn1_str = (ASN1_STRING*)X509_get_ext_d2i(x509ext, NID_key_usage, &crit, NULL); AssertIntEQ(X509_EXTENSION_set_data(ext, asn1_str), SSL_SUCCESS); + ASN1_STRING_free(asn1_str); /* X509_EXTENSION_set_data has made a copy + * and X509_get_ext_d2i has created new */ X509_EXTENSION_free(ext); #endif