Skip to content

Commit

Permalink
Merge pull request #7837 from bandi13/fixMemLeak
Browse files Browse the repository at this point in the history
Fix memory leak
  • Loading branch information
douzzer authored Aug 6, 2024
2 parents ac4f3fb + df0663b commit f7fc069
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -47267,25 +47267,21 @@ static int test_wolfSSL_tmp_dh(void)

#ifndef NO_WOLFSSL_SERVER
ExpectNotNull(ctx = SSL_CTX_new(wolfSSLv23_server_method()));
#endif
#ifndef NO_WOLFSSL_CLIENT
ExpectNotNull(ctx_c = SSL_CTX_new(wolfSSLv23_client_method()));
#ifdef NO_WOLFSSL_SERVER
ctx = ctx_c;
#endif
#endif
ExpectTrue(SSL_CTX_use_certificate_file(ctx, svrCertFile,
WOLFSSL_FILETYPE_PEM));
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile,
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl = SSL_new(ctx));
#endif
#ifndef NO_WOLFSSL_CLIENT
ExpectNotNull(ctx_c = SSL_CTX_new(wolfSSLv23_client_method()));
ExpectTrue(SSL_CTX_use_certificate_file(ctx_c, svrCertFile,
WOLFSSL_FILETYPE_PEM));
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx_c, svrKeyFile,
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl_c = SSL_new(ctx_c));
#ifdef NO_WOLFSSL_SERVER
ctx = ctx_c;
ssl = ssl_c;
#endif
#endif
Expand Down

0 comments on commit f7fc069

Please sign in to comment.