From 22b8a6430dca99b4db7170fd02b2041f538fd1bd Mon Sep 17 00:00:00 2001 From: x2018 Date: Mon, 17 Nov 2025 14:12:14 +0800 Subject: [PATCH] openssl: fix a potential memory leak of params.cert Closes #19560 --- lib/vtls/openssl.c | 1 + 1 file changed, 1 insertion(+) 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... */ -- 2.47.3