We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e1ea00 commit 000cccfCopy full SHA for 000cccf
1 file changed
examples/server/server.c
@@ -3621,14 +3621,14 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
3621
err = SSL_get_error(ssl, 0);
3622
LOG_ERROR("SSL_accept error %d, %s\n", err,
3623
ERR_error_string((unsigned long)err, buffer));
3624
+ /* cleanup before exit */
3625
+ SSL_free(ssl); ssl = NULL;
3626
+ SSL_CTX_free(ctx); ctx = NULL;
3627
+ CloseSocket(clientfd);
3628
+ CloseSocket(sockfd);
3629
if (!exitWithRet) {
3630
err_sys_ex(runWithErrors, "SSL_accept failed");
3631
} else {
- /* cleanup */
- SSL_free(ssl); ssl = NULL;
- SSL_CTX_free(ctx); ctx = NULL;
- CloseSocket(clientfd);
- CloseSocket(sockfd);
3632
((func_args*)args)->return_code = err;
3633
goto exit;
3634
}
0 commit comments