From 4f298d47afcff95c0364ee89f72c072ad1f0729c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 29 Nov 2011 05:42:46 -0800 Subject: [PATCH] ITS#7099 fix mdb_entry_return for tool mode Originally, overlays were not supposed to take effect in tool mode. Apparently that's no longer the case... --- servers/slapd/back-mdb/id2entry.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-mdb/id2entry.c b/servers/slapd/back-mdb/id2entry.c index ea9df05f2d..a4456c8d06 100644 --- a/servers/slapd/back-mdb/id2entry.c +++ b/servers/slapd/back-mdb/id2entry.c @@ -217,14 +217,14 @@ int mdb_entry_return( ) { if ( e->e_private ) { - if ( slapMode & SLAP_TOOL_MODE ) { - ch_free( e->e_nname.bv_val ); - ch_free( e->e_name.bv_val ); - ch_free( e ); - } else { + if ( op->o_hdr ) { op->o_tmpfree( e->e_nname.bv_val, op->o_tmpmemctx ); op->o_tmpfree( e->e_name.bv_val, op->o_tmpmemctx ); op->o_tmpfree( e, op->o_tmpmemctx ); + } else { + ch_free( e->e_nname.bv_val ); + ch_free( e->e_name.bv_val ); + ch_free( e ); } } else { entry_free( e ); -- 2.39.5