From: Pierangelo Masarati Date: Fri, 18 Aug 2006 17:11:41 +0000 (+0000) Subject: don't leave dangling conns in the AVL tree X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~2^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e4d24ecce89c11fc652828b1c2d37941b2d5fa06;p=openldap don't leave dangling conns in the AVL tree --- diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index f117565053..51d3456d45 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -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; } }