From: x2018 Date: Mon, 17 Nov 2025 06:12:14 +0000 (+0800) Subject: openssl: fix a potential memory leak of params.cert X-Git-Tag: rc-8_18_0-1~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22b8a6430dca99b4db7170fd02b2041f538fd1bd;p=thirdparty%2Fcurl.git openssl: fix a potential memory leak of params.cert Closes #19560 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 72ca0f6cb3..9b3ca9b5ea 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1214,6 +1214,7 @@ static int engineload(struct Curl_easy *data, failf(data, "unable to set client certificate [%s]", ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer))); + X509_free(params.cert); return 0; } X509_free(params.cert); /* we do not need the handle any more... */