diff --git a/servers/slapd/back-meta/compare.c b/servers/slapd/back-meta/compare.c index 4f0d06548f..30314eb9f6 100644 --- a/servers/slapd/back-meta/compare.c +++ b/servers/slapd/back-meta/compare.c @@ -258,7 +258,9 @@ finish:; ldap_back_dn_massage( &dc, &matched, &mmatch ); } - rs->sr_err = rres; + if ( rres != LDAP_SUCCESS ) { + rs->sr_err = rres; + } rs->sr_matched = mmatch.bv_val; send_ldap_result( op, rs ); rs->sr_matched = NULL;