From 8e730534d5faf8ca26014596eedc4f3a8a5e42b5 Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Wed, 29 Mar 2023 10:26:59 -0600 Subject: [PATCH] Free in drbg test when appropriate --- tests/api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/api.c b/tests/api.c index 60dc95823..4261dec77 100644 --- a/tests/api.c +++ b/tests/api.c @@ -61981,7 +61981,10 @@ static int test_openssl_FIPS_drbg(void) AssertIntNE(XMEMCMP(data1, zeroData, dlen), 0); AssertIntNE(XMEMCMP(data1, data2, dlen), 0); AssertIntEQ(FIPS_drbg_uninstantiate(dctx), WOLFSSL_SUCCESS); +#ifndef HAVE_GLOBAL_RNG + /* gets freed by wolfSSL_Cleanup() when HAVE_GLOBAL_RNG defined */ wolfSSL_FIPS_drbg_free(dctx); +#endif res = TEST_RES_CHECK(1); #endif