Commit c8626dd3d3a for php.net

commit c8626dd3d3ae3dc1be5d0d506823c9cab6e3d93d
Author: Jarne Clauw <67628242+JarneClauw@users.noreply.github.com>
Date:   Thu Jun 25 08:33:06 2026 +0200

    Fixing memory leak in openssl_x509_parse when str_serial creation fails (#21751)

diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 1689662f07a..2c5a93c8992 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2169,6 +2169,7 @@ PHP_FUNCTION(openssl_x509_parse)
 	str_serial = i2s_ASN1_INTEGER(NULL, asn1_serial);
 	/* Can return NULL on error or memory allocation failure */
 	if (!str_serial) {
+		OPENSSL_free(hex_serial);
 		php_openssl_store_errors();
 		goto err;
 	}