]> git.sur5r.net Git - openldap/commitdiff
fix previous commit
authorPierangelo Masarati <ando@openldap.org>
Tue, 30 Aug 2005 21:21:32 +0000 (21:21 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 30 Aug 2005 21:21:32 +0000 (21:21 +0000)
servers/slapd/back-meta/bind.c

index 7defb3d424f5f35bd5128c7e710ae8a177b7627d..6ad897ad2fed383bf774975beaffcc2e12b823a9 100644 (file)
@@ -667,6 +667,7 @@ meta_back_op_result(
                                rerr = LDAP_SUCCESS;
        char                    *rmsg = NULL;
        char                    *rmatch = NULL;
+       char                    *save_rmatch = NULL;
        void                    *rmatch_ctx = NULL;
 
        if ( candidate != META_TARGET_NONE ) {
@@ -790,6 +791,8 @@ meta_back_op_result(
                        rmatch_ctx = op->o_tmpmemctx;
                        rmatch = pdn.bv_val;
                }
+               save_rmatch = rs->sr_matched;
+               rs->sr_matched = rmatch;
        }
        send_ldap_result( op, rs );
        if ( rmsg != NULL ) {
@@ -797,7 +800,7 @@ meta_back_op_result(
        }
        if ( rmatch != NULL ) {
                ber_memfree_x( rmatch, rmatch_ctx );
-               rs->sr_matched = NULL;
+               rs->sr_matched = save_rmatch;
        }
        rs->sr_text = NULL;