]> git.sur5r.net Git - openldap/commitdiff
don't leave dangling conns in the AVL tree
authorPierangelo Masarati <ando@openldap.org>
Fri, 18 Aug 2006 17:11:41 +0000 (17:11 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 18 Aug 2006 17:11:41 +0000 (17:11 +0000)
servers/slapd/back-ldap/bind.c

index f117565053f6ecb74c60125f0bbab937573c62d6..51d3456d456fb75de7d6c10261514e0b7b718509 100644 (file)
@@ -1418,14 +1418,16 @@ ldap_back_retry( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_back_send_
                if ( rc != LDAP_SUCCESS ) {
                        rc = 0;
                        /* freeit, because lc_refcnt == 1 */
-                       (void)ldap_back_conn_free( *lcp );
+                       (*lcp)->lc_refcnt = 0;
+                       (void)ldap_back_freeconn( op, *lcp, 0 );
                        *lcp = NULL;
 
                } else {
                        rc = ldap_back_dobind_int( *lcp, op, rs, sendok, 0, 0 );
                        if ( rc == 0 && *lcp != NULL ) {
                                /* freeit, because lc_refcnt == 1 */
-                               (void)ldap_back_conn_free( *lcp );
+                               (*lcp)->lc_refcnt = 0;
+                               (void)ldap_back_freeconn( op, *lcp, 0 );
                                *lcp = NULL;
                        }
                }