diff --git a/servers/slapd/back-bdb/compare.c b/servers/slapd/back-bdb/compare.c index d8abfd40f7..fc1a2b37e1 100644 --- a/servers/slapd/back-bdb/compare.c +++ b/servers/slapd/back-bdb/compare.c @@ -107,15 +107,14 @@ bdb_compare( } - if( rc != LDAP_NO_SUCH_ATTRIBUTE ) { +return_results: + send_ldap_result( conn, op, rc, + NULL, text, NULL, NULL ); + + if( rc == LDAP_COMPARE_FALSE || rc == LDAP_COMPARE_TRUE ) { rc = LDAP_SUCCESS; } - -return_results: - send_ldap_result( conn, op, LDAP_SUCCESS, - NULL, text, NULL, NULL ); - done: /* free entry */ if( e != NULL ) {