From: David Garske Date: Wed, 19 Dec 2018 16:30:44 +0000 (-0800) Subject: wolfssl: Perform cleanup X-Git-Tag: curl-7_64_0~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=982a897b4bc22fa49da2501af8242e8c8ce1792c;p=thirdparty%2Fcurl.git 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 Reviewed-by: Daniel Gustafsson --- diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 0d45afbf0c..ea96cf65e5 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 */