From: Pierangelo Masarati Date: Tue, 4 Jan 2011 18:27:02 +0000 (+0000) Subject: make sure matched is NULL when err=SUCCESS (ITS#6774) X-Git-Tag: MIGRATION_CVS2GIT~246 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fc6bd40dfca67f731d63301466397d08e7fa4acf;p=openldap make sure matched is NULL when err=SUCCESS (ITS#6774) --- 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;