From 0f18805d65ed9dfaeaad99eb94314a52cbe5fcbf Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 19 Jul 2005 14:39:43 +0000 Subject: [PATCH] Memory cleanup --- servers/slapd/back-monitor/init.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 055af96c0a..e3cac86c00 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -618,7 +618,11 @@ monitor_filter2ndn( op->o_tag = LDAP_REQ_SEARCH; /* use global malloc for now */ - op->o_tmpmemctx = NULL; + if ( op->o_tmpmemctx ) { + /* FIXME: connection_fake_init() calls slap_sl_mem_create, so we destroy it for now */ + slap_sl_mem_destroy( NULL, op->o_tmpmemctx ); + op->o_tmpmemctx = NULL; + } op->o_tmpmfuncs = &ch_mfuncs; op->o_bd = be_monitor; @@ -631,7 +635,7 @@ monitor_filter2ndn( } else { if ( dnPrettyNormal( NULL, base, &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx ) ) { - /* error */ + return -1; } } -- 2.39.5