diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-25 15:49:28 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-26 11:43:11 +0200 |
commit | 80958d0f90dfa9a48e92e81e027121ec091c9d03 (patch) | |
tree | 4c85d5f48226a111f6dc07fff5b96ec7b13785af | |
parent | 698dd32b03dc4e9998364247bab1d0ace55910e4 (diff) | |
download | php-git-80958d0f90dfa9a48e92e81e027121ec091c9d03.tar.gz |
Use ldap_destroy instead of ldap_unbind_ext
-rw-r--r-- | ext/ldap/ldap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 3603ddda38..4460204071 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -104,7 +104,10 @@ static void _close_ldap_link(zend_resource *rsrc) /* {{{ */ { ldap_linkdata *ld = (ldap_linkdata *)rsrc->ptr; - ldap_unbind_ext(ld->link, NULL, NULL); + /* We use ldap_destroy rather than ldap_unbind here, because ldap_unbind + * will skip the destructor entirely if a critical client control is set. */ + ldap_destroy(ld->link); + #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC) zval_ptr_dtor(&ld->rebindproc); #endif |