Commit 5695cee84e0 for php.net

commit 5695cee84e0814faf384aa34076a98699487a4cb
Merge: 8908a819730 b98d5539597
Author: Niels Dossche <7771979+ndossche@users.noreply.github.com>
Date:   Mon Dec 8 22:31:15 2025 +0100

    Merge branch 'PHP-8.5'

    * PHP-8.5:
      ldap: Fix memory leak in ldap_set_options()

diff --cc ext/ldap/ldap.c
index c2b08d0c670,86ac58c5273..9e566a4ed1d
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@@ -684,9 -684,10 +684,10 @@@ static int php_ldap_control_from_array(
  				goto failure;
  			}

+ 			zend_string *context_str = NULL;
  			if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "context", sizeof("context") - 1)) != NULL) {
- 				tmpstring = zval_try_get_string(tmp);
- 				if (!tmpstring) {
 -				context_str = zval_get_string(tmp);
 -				if (EG(exception)) {
++				context_str = zval_try_get_string(tmp);
++				if (!context_str) {
  					rc = -1;
  					goto failure;
  				}