]> git.sur5r.net Git - openldap/commitdiff
cleanup resource release
authorPierangelo Masarati <ando@openldap.org>
Thu, 8 Jun 2006 23:41:02 +0000 (23:41 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 8 Jun 2006 23:41:02 +0000 (23:41 +0000)
servers/slapd/back-ldap/bind.c
servers/slapd/back-meta/bind.c

index b3433d322ab3cd24cdf0378a82b6a6dd8bb43e24..fd51c670a0bc091d872731d2113d90ed7a00c4ff 100644 (file)
@@ -182,7 +182,7 @@ retry_lock:;
                                        "=>ldap_back_bind: destroying conn %ld (refcnt=%u)\n",
                                        LDAP_BACK_PCONN_ID( lc->lc_conn ), lc->lc_refcnt, 0 );
 
-                               if ( lc->lc_refcnt != 0 ) {
+                               if ( tmplc->lc_refcnt != 0 ) {
                                        /* taint it */
                                        LDAP_BACK_CONN_TAINTED_SET( tmplc );
 
@@ -1432,6 +1432,7 @@ ldap_back_retry( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_back_send_
                        "ldap_back_retry: conn %p refcnt=%u unable to retry.\n",
                        (void *)(*lcp), (*lcp)->lc_refcnt, 0 );
 
+               LDAP_BACK_CONN_TAINTED_SET( *lcp );
                ldap_back_release_conn_lock( op, rs, *lcp, 0 );
                *lcp = NULL;
 
index 0e2d4b1ac05e053fe4ad130ae45d3cbccbc18ee5..af9b13a8caa55eb0d8c6d336887e9a67da02e380 100644 (file)
@@ -217,7 +217,7 @@ retry_lock:;
                                                "=>meta_back_bind: destroying conn %ld (refcnt=%u)\n",
                                                LDAP_BACK_PCONN_ID( mc->mc_conn ), mc->mc_refcnt, 0 );
 
-                                       if ( mc->mc_refcnt != 0 ) {
+                                       if ( tmpmc->mc_refcnt != 0 ) {
                                                /* taint it */
                                                LDAP_BACK_CONN_TAINTED_SET( tmpmc );