Skip to content

Commit f7fc069

Browse files
authored
Merge pull request #7837 from bandi13/fixMemLeak
Fix memory leak
2 parents ac4f3fb + df0663b commit f7fc069

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

tests/api.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47267,25 +47267,21 @@ static int test_wolfSSL_tmp_dh(void)
4726747267

4726847268
#ifndef NO_WOLFSSL_SERVER
4726947269
ExpectNotNull(ctx = SSL_CTX_new(wolfSSLv23_server_method()));
47270-
#endif
47271-
#ifndef NO_WOLFSSL_CLIENT
47272-
ExpectNotNull(ctx_c = SSL_CTX_new(wolfSSLv23_client_method()));
47273-
#ifdef NO_WOLFSSL_SERVER
47274-
ctx = ctx_c;
47275-
#endif
47276-
#endif
4727747270
ExpectTrue(SSL_CTX_use_certificate_file(ctx, svrCertFile,
4727847271
WOLFSSL_FILETYPE_PEM));
4727947272
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile,
4728047273
WOLFSSL_FILETYPE_PEM));
4728147274
ExpectNotNull(ssl = SSL_new(ctx));
47275+
#endif
4728247276
#ifndef NO_WOLFSSL_CLIENT
47277+
ExpectNotNull(ctx_c = SSL_CTX_new(wolfSSLv23_client_method()));
4728347278
ExpectTrue(SSL_CTX_use_certificate_file(ctx_c, svrCertFile,
4728447279
WOLFSSL_FILETYPE_PEM));
4728547280
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx_c, svrKeyFile,
4728647281
WOLFSSL_FILETYPE_PEM));
4728747282
ExpectNotNull(ssl_c = SSL_new(ctx_c));
4728847283
#ifdef NO_WOLFSSL_SERVER
47284+
ctx = ctx_c;
4728947285
ssl = ssl_c;
4729047286
#endif
4729147287
#endif

0 commit comments

Comments
 (0)