|
1 | 1 | /* server-tls-threaded.c |
2 | 2 | * |
3 | | - * Copyright (C) 2006-2020 wolfSSL Inc. |
| 3 | + * Copyright (C) 2006-2022 wolfSSL Inc. |
4 | 4 | * |
5 | 5 | * This file is part of wolfSSL. (formerly known as CyaSSL) |
6 | 6 | * |
@@ -115,7 +115,7 @@ void* ClientHandler(void* args) |
115 | 115 | wolfSSL_free(ssl); /* Free the wolfSSL object */ |
116 | 116 | close(pkg->connd); /* Close the connection to the server */ |
117 | 117 | pkg->open = 1; /* Indicate that execution is over */ |
118 | | - pthread_exit(NULL); /* End theread execution */ |
| 118 | + pthread_exit(NULL); /* End thread execution */ |
119 | 119 | } |
120 | 120 |
|
121 | 121 | /* Check for server shutdown command */ |
@@ -147,7 +147,10 @@ void* ClientHandler(void* args) |
147 | 147 | wolfSSL_free(ssl); /* Free the wolfSSL object */ |
148 | 148 | close(pkg->connd); /* Close the connection to the server */ |
149 | 149 | pkg->open = 1; /* Indicate that execution is over */ |
150 | | - pthread_exit(NULL); /* End theread execution */ |
| 150 | +#if defined(HAVE_ECC) && defined(FP_ECC) |
| 151 | + wc_ecc_fp_free(); /* free per thread cache */ |
| 152 | +#endif |
| 153 | + pthread_exit(NULL); /* End thread execution */ |
151 | 154 | } |
152 | 155 |
|
153 | 156 |
|
@@ -245,7 +248,7 @@ int main() |
245 | 248 |
|
246 | 249 |
|
247 | 250 |
|
248 | | - /* initialise thread array */ |
| 251 | + /* Initialize thread array */ |
249 | 252 | for (i = 0; i < MAX_CONCURRENT_THREADS; ++i) { |
250 | 253 | printf("Creating %d thread\n", i); |
251 | 254 | thread[i].open = 1; |
@@ -274,7 +277,7 @@ int main() |
274 | 277 |
|
275 | 278 |
|
276 | 279 |
|
277 | | - /* Fill out the relevent thread argument package information */ |
| 280 | + /* Fill out the relevant thread argument package information */ |
278 | 281 | thread[i].open = 0; |
279 | 282 | thread[i].connd = connd; |
280 | 283 |
|
|
0 commit comments