We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 698dd32 commit 80958d0Copy full SHA for 80958d0
ext/ldap/ldap.c
@@ -104,7 +104,10 @@ static void _close_ldap_link(zend_resource *rsrc) /* {{{ */
104
{
105
ldap_linkdata *ld = (ldap_linkdata *)rsrc->ptr;
106
107
- ldap_unbind_ext(ld->link, NULL, NULL);
+ /* We use ldap_destroy rather than ldap_unbind here, because ldap_unbind
108
+ * will skip the destructor entirely if a critical client control is set. */
109
+ ldap_destroy(ld->link);
110
+
111
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
112
zval_ptr_dtor(&ld->rebindproc);
113
#endif
0 commit comments