From f92dc7b5faaab39fc7659db754e07e9e78de3596 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 27 Jan 2007 18:38:24 +0000 Subject: [PATCH] Partially revert prev commit, just omit the sl_mem_destroy --- servers/slapd/back-monitor/init.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index b37a21b43f..978d1301c8 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -723,6 +723,12 @@ monitor_search2ndn( op->o_tag = LDAP_REQ_SEARCH; + /* use global malloc for now */ + if ( op->o_tmpmemctx ) { + op->o_tmpmemctx = NULL; + } + op->o_tmpmfuncs = &ch_mfuncs; + op->o_bd = be_monitor; if ( nbase == NULL || BER_BVISNULL( nbase ) ) { ber_dupbv_x( &op->o_req_dn, &op->o_bd->be_suffix[ 0 ], @@ -769,12 +775,12 @@ cleanup:; if ( !BER_BVISNULL( &op->ors_filterstr ) ) { op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx ); } - if ( !BER_BVISNULL( &op->o_req_ndn ) ) { - op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx ); - } if ( !BER_BVISNULL( &op->o_req_dn ) ) { op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx ); } + if ( !BER_BVISNULL( &op->o_req_ndn ) ) { + op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx ); + } if ( rc != 0 ) { return rc; -- 2.39.5