From 666e0677cadb9a77364a1c266f1d5d8b49563d71 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 8 Apr 2006 15:59:59 +0000 Subject: [PATCH] re-fix previous commit --- servers/slapd/back-ldap/bind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index b6b449cd82..2399c85a6d 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -131,7 +131,7 @@ retry_lock:; assert( lc->lc_refcnt == 1 ); tmplc = avl_delete( &li->li_conninfo.lai_tree, (caddr_t)lc, ldap_back_conndnlc_cmp ); - assert( lc == tmplc ); + assert( tmplc == NULL || lc == tmplc ); if ( LDAP_BACK_CONN_ISBOUND( lc ) ) { ber_bvreplace( &lc->lc_local_ndn, &op->o_req_ndn ); @@ -749,7 +749,8 @@ ldap_back_release_conn_lock( } assert( lc->lc_refcnt > 0 ); LDAP_BACK_CONN_BINDING_CLEAR( lc ); - if ( --lc->lc_refcnt == 0 || LDAP_BACK_CONN_TAINTED( lc ) ) { + lc->lc_refcnt--; + if ( LDAP_BACK_CONN_TAINTED( lc ) ) { ldap_back_freeconn( op, lc, 0 ); } if ( dolock ) { -- 2.39.5