From adc358f664cc0efc10be7db65759d89b233377e5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 15 Jul 2008 12:31:08 +0000 Subject: [PATCH] free filter before overlays' cleanup callback --- servers/slapd/back-ldap/search.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 430162f57c..fb32cb0373 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -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 );