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
This commit is contained in:
Daniel Stenberg 2025-10-18 12:11:09 +02:00
parent f847d2ed02
commit 8de898414c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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) {