Add some missing frees to the example client when using in the return-not-exit mode for tests.

pull/3151/head
John Safranek 2020-07-23 14:32:48 -07:00
parent 839044d9e1
commit fd1a1bd0f7
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}