Skip to content

Commit 4434d89

Browse files
authored
Merge pull request #5894 from kaleb-himes/fix-leak
Fix a quick leak in the test apps
2 parents aa78439 + b23db16 commit 4434d89

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/api.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54596,10 +54596,10 @@ static int test_wolfSSL_DH(void)
5459654596
#ifdef WOLFSSL_KEY_GEN
5459754597
AssertNotNull(dh = DH_generate_parameters(2048, 2, NULL, NULL));
5459854598
AssertIntEQ(wolfSSL_DH_generate_parameters_ex(NULL, 2048, 2, NULL), 0);
54599-
#endif
5460054599
DH_free(dh);
5460154600
#endif
54602-
#endif
54601+
#endif /* !HAVE_FIPS || (HAVE_FIPS_VERSION && HAVE_FIPS_VERSION > 2) */
54602+
#endif /* OPENSSL_ALL */
5460354603

5460454604
(void)dh;
5460554605
(void)p;
@@ -54775,10 +54775,12 @@ static int test_wolfSSL_DH_dup(void)
5477554775
dhDup = wolfSSL_DH_dup(dh);
5477654776
AssertNotNull(dhDup);
5477754777
wolfSSL_DH_free(dhDup);
54778+
#else
54779+
wolfSSL_BN_free(p);
54780+
wolfSSL_BN_free(g);
5477854781
#endif
5477954782

5478054783
wolfSSL_DH_free(dh);
54781-
5478254784
res = TEST_RES_CHECK(1);
5478354785
#endif
5478454786
#endif

0 commit comments

Comments
 (0)