aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDavid Garske <david@wolfssl.com>2018-12-19 08:30:44 -0800
committerDaniel Gustafsson <daniel@yesql.se>2018-12-20 11:32:55 +0100
commit982a897b4bc22fa49da2501af8242e8c8ce1792c (patch)
tree26af7d652abf560009bf45685defaf9a30d073df /lib/vtls
parent0b9fadf81fae1adaefa925c49c8655bc40971168 (diff)
wolfssl: Perform cleanup
This adds a cleanup callback for cyassl. Resolves possible memory leak when using ECC fixed point cache. Closes #3395 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/cyassl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c
index 0d45afbf0..ea96cf65e 100644
--- a/lib/vtls/cyassl.c
+++ b/lib/vtls/cyassl.c
@@ -794,6 +794,12 @@ static int Curl_cyassl_init(void)
}
+static void Curl_cyassl_cleanup(void)
+{
+ CyaSSL_Cleanup();
+}
+
+
static bool Curl_cyassl_data_pending(const struct connectdata* conn,
int connindex)
{
@@ -1004,7 +1010,7 @@ const struct Curl_ssl Curl_ssl_cyassl = {
sizeof(struct ssl_backend_data),
Curl_cyassl_init, /* init */
- Curl_none_cleanup, /* cleanup */
+ Curl_cyassl_cleanup, /* cleanup */
Curl_cyassl_version, /* version */
Curl_none_check_cxn, /* check_cxn */
Curl_cyassl_shutdown, /* shutdown */