mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Add some missing frees to the example client when using in the return-not-exit mode for tests.
This commit is contained in:
@ -3165,12 +3165,16 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
err = ClientWrite(ssl, msg, msgSz, "", exitWithRet);
|
||||
if (exitWithRet && (err != 0)) {
|
||||
((func_args*)args)->return_code = err;
|
||||
wolfSSL_free(ssl); ssl = NULL;
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
err = ClientRead(ssl, reply, sizeof(reply)-1, 1, "", exitWithRet);
|
||||
if (exitWithRet && (err != 0)) {
|
||||
((func_args*)args)->return_code = err;
|
||||
wolfSSL_free(ssl); ssl = NULL;
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user