]> git.sur5r.net Git - openldap/commitdiff
free filter before overlays' cleanup callback
authorPierangelo Masarati <ando@openldap.org>
Tue, 15 Jul 2008 12:31:08 +0000 (12:31 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 15 Jul 2008 12:31:08 +0000 (12:31 +0000)
servers/slapd/back-ldap/search.c

index 430162f57c459ae141d1267d39e9807e4e47b6f4..fb32cb0373acb404bee976057f47d0cc12152cf7 100644 (file)
@@ -532,6 +532,10 @@ finish:;
                ldap_back_quarantine( op, rs );
        }
 
+       if ( filter.bv_val != op->ors_filterstr.bv_val ) {
+               op->o_tmpfree( filter.bv_val, op->o_tmpmemctx );
+       }
+
 #if 0
        /* let send_ldap_result play cleanup handlers (ITS#4645) */
        if ( rc != SLAPD_ABANDON )
@@ -557,10 +561,6 @@ finish:;
                rs->sr_matched = save_matched;
        }
 
-       if ( filter.bv_val != op->ors_filterstr.bv_val ) {
-               op->o_tmpfree( filter.bv_val, op->o_tmpmemctx );
-       }
-
        if ( rs->sr_text ) {
                if ( freetext ) {
                        LDAP_FREE( (char *)rs->sr_text );