From: Pierangelo Masarati Date: Tue, 19 Jul 2005 14:39:43 +0000 (+0000) Subject: Memory cleanup X-Git-Tag: OPENLDAP_AC_BP~326 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0f18805d65ed9dfaeaad99eb94314a52cbe5fcbf;p=openldap Memory cleanup --- 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; } }