]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/search.c
TS#7303 tweak
[openldap] / servers / slapd / back-bdb / search.c
index a822564c558b4ecda796223fab55497e2e4537a7..d30d7b9f2e7b5ba1095bb67ddf756fb838ae8788 100644 (file)
@@ -1253,7 +1253,7 @@ static int search_candidates(
 
        if( op->ors_deref & LDAP_DEREF_SEARCHING ) {
                rc = search_aliases( op, rs, e, txn, ids, scopes, stack );
-               if ( BDB_IDL_IS_ZERO( ids ))
+               if ( BDB_IDL_IS_ZERO( ids ) && rc == LDAP_SUCCESS )
                        rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );
        } else {
                rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );