]> git.sur5r.net Git - openldap/commitdiff
refine fix to ITS#2999
authorPierangelo Masarati <ando@openldap.org>
Sat, 6 Mar 2004 09:41:06 +0000 (09:41 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 6 Mar 2004 09:41:06 +0000 (09:41 +0000)
CHANGES
servers/slapd/back-ldap/search.c

diff --git a/CHANGES b/CHANGES
index 5e0b000ca227d8fb387a744a8f48a4d4155b00f6..32b39132a63feb3729bb8927eb9bbe67530a0ee0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ OpenLDAP 2.2 Change Log
 OpenLDAP 2.2.7 Engineering
        Added total operation count in back-monitor (ITS#2983)
        Fixed search abandon handling in backglue (ITS#2999)
+       Fixed massaged base free in back-ldap (ITS#2999)
        Fixed (undocumented) AD canonical DN (ITS#3000)
 
 OpenLDAP 2.2.6 Release
index fac26b544962d51654f03f37e8aac61e2065d372..a3aa7a2cc3bf5f750ca764d1fff35018f2302314 100644 (file)
@@ -154,7 +154,17 @@ ldap_back_search(
        rc = ldap_back_filter_map_rewrite( &dc, op->oq_search.rs_filter,
                        &mfilter, BACKLDAP_MAP );
 
-       if ( rc ) {
+       switch ( rc ) {
+       case LDAP_SUCCESS:
+               break;
+
+       case LDAP_COMPARE_FALSE:
+               rs->sr_err = LDAP_SUCCESS;
+               rs->sr_text = NULL;
+               rc = 0;
+               goto finish;
+
+       default:
                rs->sr_err = LDAP_OTHER;
                rs->sr_text = "Rewrite error";
                dontfreetext = 1;
@@ -354,7 +364,7 @@ finish:;
        if ( mfilter.bv_val != op->oq_search.rs_filterstr.bv_val ) {
                ch_free( mfilter.bv_val );
        }
-       if ( mbase.bv_val != op->o_req_dn.bv_val ) {
+       if ( mbase.bv_val != op->o_req_ndn.bv_val ) {
                free( mbase.bv_val );
        }