Fix for example client/server with `-H exitWithRet` option to make sure all cleanup is performed. Resolves valgrind report due to `TicketCleanup()` not being called.

pull/1538/head
David Garske 2018-05-03 13:39:37 -07:00
parent 325402cf5a
commit 3fd47bdff3
2 changed files with 5 additions and 2 deletions

View File

@ -2115,7 +2115,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
/* if you're getting an error here */
((func_args*)args)->return_code = err;
return 0;
goto exit;
}
showPeer(ssl);
@ -2577,6 +2577,8 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
((func_args*)args)->return_code = 0;
exit:
#ifdef WOLFSSL_ASYNC_CRYPT
wolfAsync_DevClose(&devId);
#endif

View File

@ -1490,7 +1490,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
err_sys_ex(runWithErrors, "SSL_accept failed");
((func_args*)args)->return_code = err;
return 0;
goto exit;
}
showPeer(ssl);
@ -1677,6 +1677,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
((func_args*)args)->return_code = 0;
exit:
#if defined(NO_MAIN_DRIVER) && defined(HAVE_ECC) && defined(FP_ECC) \
&& defined(HAVE_THREAD_LS)