]> git.sur5r.net Git - openldap/commitdiff
make sure matched is NULL when err=SUCCESS (ITS#6774)
authorPierangelo Masarati <ando@openldap.org>
Tue, 4 Jan 2011 18:27:02 +0000 (18:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 4 Jan 2011 18:27:02 +0000 (18:27 +0000)
servers/slapd/back-meta/search.c

index 09e94a255e7db83af74703a2b34751209d133749..e96a326b37119d1be67bb213c002d76fb4d2cbc8 100644 (file)
@@ -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;