mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +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);
|
err = ClientWrite(ssl, msg, msgSz, "", exitWithRet);
|
||||||
if (exitWithRet && (err != 0)) {
|
if (exitWithRet && (err != 0)) {
|
||||||
((func_args*)args)->return_code = err;
|
((func_args*)args)->return_code = err;
|
||||||
|
wolfSSL_free(ssl); ssl = NULL;
|
||||||
|
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ClientRead(ssl, reply, sizeof(reply)-1, 1, "", exitWithRet);
|
err = ClientRead(ssl, reply, sizeof(reply)-1, 1, "", exitWithRet);
|
||||||
if (exitWithRet && (err != 0)) {
|
if (exitWithRet && (err != 0)) {
|
||||||
((func_args*)args)->return_code = err;
|
((func_args*)args)->return_code = err;
|
||||||
|
wolfSSL_free(ssl); ssl = NULL;
|
||||||
|
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user