]> git.sur5r.net Git - openldap/commitdiff
Minor cleanup (coverity)
authorHoward Chu <hyc@openldap.org>
Wed, 14 Jan 2015 12:27:28 +0000 (12:27 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 14 Jan 2015 12:48:44 +0000 (12:48 +0000)
servers/slapd/back-meta/config.c
servers/slapd/back-meta/search.c

index e3164b01f8e7e7836eaf30622b8078573066cbbd..bcf535974302f2c7df2e5e98e11ea15e885270e0 100644 (file)
@@ -1790,7 +1790,7 @@ meta_back_cf_gen( ConfigArgs *c )
                case LDAP_BACK_CFG_IDASSERT_AUTHZFROM: {
                        BerVarray *bvp;
 
-                       bvp = &mt->mt_idassert_authz; break;
+                       bvp = &mt->mt_idassert_authz;
                        if ( c->valx < 0 ) {
                                if ( *bvp != NULL ) {
                                        ber_bvarray_free( *bvp );
@@ -2657,6 +2657,7 @@ idassert-authzFrom        "dn:<rootdn>"
 
                        /* re-parse all rewrite rules, up to the one
                         * that needs to be added */
+                       ca.be = c->be;
                        ca.fname = c->fname;
                        ca.lineno = c->lineno;
                        for ( i = 0; i < ix; i++ ) {
index eec9d5823448b64004c6aef8d8697adbecfa83c5..a20e941748be0fcd604b6926c69c46fb26bb4bff 100644 (file)
@@ -251,6 +251,7 @@ retry:;
                Debug( LDAP_DEBUG_ANY, "%s meta_search_dobind_init[%d] mc=%p: "
                        "empty dn with non-empty cred: error\n",
                        op->o_log_prefix, candidate, (void *)mc );
+               rc = LDAP_OTHER;
                goto other;
        }
 
@@ -335,7 +336,7 @@ down:;
 
                if ( *mcp == NULL ) {
                        retcode = META_SEARCH_ERR;
-                       rs->sr_err = LDAP_UNAVAILABLE;
+                       rc = LDAP_UNAVAILABLE;
                        candidates[ candidate ].sr_msgid = META_MSGID_IGNORE;
                        break;
                }
@@ -353,7 +354,6 @@ other:;
                        LDAP_BACK_CONN_TAINTED_SET( mc );
                        meta_back_release_conn_lock( mi, mc, 0 );
                        *mcp = NULL;
-                       rs->sr_err = rc;
 
                        retcode = META_SEARCH_ERR;