r4289: Close LDAP-Connection before retrying to open a new connection in the
[samba.git] / source / lib / smbldap.c
index 7e485457b084a3158175942d5260bbe8a3bd8fe5..4afafde9bb61feb5b224177f3bf9098bb860ff20 100644 (file)
@@ -977,6 +977,7 @@ static int another_ldap_try(struct smbldap_state *ldap_state, int *rc,
 
                *attempts += 1;
 
+               smbldap_close(ldap_state);
                open_rc = smbldap_open(ldap_state);
 
                if (open_rc == LDAP_SUCCESS) {