]> git.sur5r.net Git - openldap/commitdiff
ITS#5980
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 5 Mar 2009 20:07:20 +0000 (20:07 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 5 Mar 2009 20:07:20 +0000 (20:07 +0000)
CHANGES
libraries/libldap/request.c
libraries/libldap/result.c

diff --git a/CHANGES b/CHANGES
index b15f903c4fafef37230ce96b4d3fd285a9e5fb33..5dea086db60151f0f98b1e4806c3c23bbd8d14ea 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,7 @@ OpenLDAP 2.4.16 Engineering
        Fixed libldap GnuTLS TLSVerifyCilent try (ITS#5981)
        Fixed libldap segfault in checking cert/DN (ITS#5976)
        Fixed libldap peer cert memory leak again (ITS#5849)
+       Fixed libldap referral chasing (ITS#5980)
        Fixed slapd backglue with empty DBs (ITS#5986)
        Fixed slapd-bdb/hdb cachesize handling (ITS#5860)
        Fixed slapd-ldap/meta with broken AD results (ITS#5977)
index 0fdf5c9794b755b9a30b7de27b99b3ffcc9aa5ea..6098f0c904b14c48389c189c55252c6f0ff78dc2 100644 (file)
@@ -635,8 +635,7 @@ find_connection( LDAP *ld, LDAPURLDesc *srv, int any )
 
                        if ( lsu_port == lcu_port
                                && strcmp( lcu->lud_scheme, lsu->lud_scheme ) == 0
-                               && lcu->lud_host != NULL && *lcu->lud_host != '\0'
-                               && lsu->lud_host != NULL && *lsu->lud_host != '\0'
+                               && lcu->lud_host != NULL && lsu->lud_host != NULL
                                && strcasecmp( lsu->lud_host, lcu->lud_host ) == 0 )
                        {
                                found = 1;
index ad62a02d30749e00d16a9dcd38f86825ad630ca3..afdc236ea7eb2d20e624f4bacddb86696e01c960 100644 (file)
@@ -845,6 +845,10 @@ nextresp2:
                                return( -1 );   /* fatal error */
                        }
                        lr->lr_res_errno = LDAP_SUCCESS; /* sucessfully chased referral */
+                       if ( lr->lr_res_matched ) {
+                               LDAP_FREE( lr->lr_res_matched );
+                               lr->lr_res_matched = NULL;
+                       }
 
                } else {
                        if ( lr->lr_outrefcnt <= 0 && lr->lr_parent == NULL ) {