From: Daniel Stenberg Date: Sat, 18 Oct 2025 10:11:09 +0000 (+0200) Subject: openssl: free UI_METHOD on exit path X-Git-Tag: rc-8_17_0-2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8de898414c422ed56980dd4ac3a0125bc6fec5c5;p=thirdparty%2Fcurl.git openssl: free UI_METHOD on exit path In providercheck(), when failing to open the "store", the exit path would not previously free the created UI_METHOD and instead leak this resource. Pointed out by ZeroPath Closes #19114 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 2868ea85ec..66c0fbfabd 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1328,6 +1328,7 @@ static int providercheck(struct Curl_easy *data, failf(data, "Failed to open OpenSSL store: %s", ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer))); + UI_destroy_method(ui_method); return 0; } if(OSSL_STORE_expect(store, OSSL_STORE_INFO_PKEY) != 1) {