From fc6bd40dfca67f731d63301466397d08e7fa4acf Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 4 Jan 2011 18:27:02 +0000 Subject: [PATCH] make sure matched is NULL when err=SUCCESS (ITS#6774) --- servers/slapd/back-meta/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 09e94a255e..e96a326b37 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -1918,7 +1918,7 @@ free_message:; } rs->sr_err = sres; - rs->sr_matched = matched; + rs->sr_matched = ( sres == LDAP_SUCCESS ? NULL : matched ); rs->sr_ref = ( sres == LDAP_REFERRAL ? rs->sr_v2ref : NULL ); send_ldap_result( op, rs ); op->o_private = savepriv; -- 2.39.5