]> git.sur5r.net Git - openldap/commitdiff
rearrange error handling
authorPierangelo Masarati <ando@openldap.org>
Mon, 11 Sep 2006 21:04:25 +0000 (21:04 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 11 Sep 2006 21:04:25 +0000 (21:04 +0000)
servers/slapd/back-ldap/bind.c

index 1557de1e0a5476be661118911f67421f67442367..d408252bce72f563ccfafc9291f5fbc8dddd0d41 100644 (file)
@@ -1467,11 +1467,11 @@ ldap_back_retry( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_back_send_
                /* lc here must be the regular lc, reset and ready for init */
                rc = ldap_back_prepare_conn( lcp, op, rs, sendok );
                if ( rc != LDAP_SUCCESS ) {
-                       rc = 0;
                        /* freeit, because lc_refcnt == 1 */
                        (*lcp)->lc_refcnt = 0;
                        (void)ldap_back_freeconn( op, *lcp, 0 );
                        *lcp = NULL;
+                       rc = 0;
 
                } else {
                        rc = ldap_back_dobind_int( *lcp, op, rs, sendok, 0, 0 );