From b23db16ff8c861546b598351dff0f9b14878b57d Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Thu, 15 Dec 2022 12:21:08 -0700 Subject: [PATCH] Refactor the double-free fix --- tests/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/api.c b/tests/api.c index 071041a17..3a924691e 100644 --- a/tests/api.c +++ b/tests/api.c @@ -54596,6 +54596,7 @@ static int test_wolfSSL_DH(void) #ifdef WOLFSSL_KEY_GEN AssertNotNull(dh = DH_generate_parameters(2048, 2, NULL, NULL)); AssertIntEQ(wolfSSL_DH_generate_parameters_ex(NULL, 2048, 2, NULL), 0); + DH_free(dh); #endif #endif /* !HAVE_FIPS || (HAVE_FIPS_VERSION && HAVE_FIPS_VERSION > 2) */ #endif /* OPENSSL_ALL */