Commit 1c941755f8a for php.net

commit 1c941755f8a6b16485da2e4d1327916c8c1af430
Merge: 513f129a92f 4bb68c567fa
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date:   Fri Apr 3 22:35:36 2026 +0200

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      Fix memory leaks when adding certificate to store fails
      Fix missing error propagation in openssl_x509_export_to_file()
      Fix memory leak on error path in openssl_open()

diff --cc ext/openssl/openssl.c
index 1cee9c30974,7e6638f7fd2..ad2457672d0
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@@ -4378,10 -7501,11 +4375,11 @@@ PHP_FUNCTION(openssl_open
  		RETURN_FALSE;
  	}

 -	cipher = EVP_get_cipherbyname(method);
 +	cipher = php_openssl_get_evp_cipher_by_name(method);
  	if (!cipher) {
  		php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm");
- 		RETURN_FALSE;
+ 		RETVAL_FALSE;
+ 		goto out_pkey;
  	}

  	cipher_iv_len = EVP_CIPHER_iv_length(cipher);