From: Howard Chu Date: Tue, 29 Nov 2011 13:42:46 +0000 (-0800) Subject: ITS#7099 fix mdb_entry_return for tool mode X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4f298d47afcff95c0364ee89f72c072ad1f0729c;p=openldap 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... --- 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 );