From 6081bdaad612a3dedd5a1f9fc51e1d69efe5c7c6 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Fri, 6 Dec 2019 12:00:33 -0700 Subject: [PATCH] free PKCS7 before creating new in API test --- tests/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/api.c b/tests/api.c index a0d3ade07..885143723 100644 --- a/tests/api.c +++ b/tests/api.c @@ -16850,6 +16850,7 @@ static void test_wc_PKCS7_EncodeSignedData(void) !defined(NO_RSA) && !defined(NO_SHA256) /* test RSA sign raw digest callback, if using RSA and compiled in. * Example callback assumes SHA-256, so only run test if compiled in. */ + wc_PKCS7_Free(pkcs7); AssertNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, devId)); AssertIntEQ(wc_PKCS7_InitWithCert(pkcs7, cert, certSz), 0);