From 6ad5fd16ca0f5d1a22f64814cc042025ab3ff9fd Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 23 Oct 2003 01:29:56 +0000 Subject: [PATCH] Use tmpmem for group cache, doesn't need cleanup --- servers/slapd/backend.c | 2 +- servers/slapd/operation.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 1ee3375a48..009a8855d1 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1279,7 +1279,7 @@ backend_group( } if ( op->o_tag != LDAP_REQ_BIND && !op->o_do_not_cache ) { - g = ch_malloc(sizeof(GroupAssertion) + gr_ndn->bv_len); + g = sl_malloc(sizeof(GroupAssertion) + gr_ndn->bv_len, op->o_tmpmemctx); g->ga_be = op->o_bd; g->ga_oc = group_oc; g->ga_at = group_at; diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index 1d00fc625f..2941bc0301 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -69,6 +69,7 @@ slap_op_free( Operation *op ) free( op->o_sync_state.bv_val ); } +#if 0 /* needless, since it was allocated in tmpmem */ { GroupAssertion *g, *n; for (g = op->o_groups; g; g=n) { @@ -77,6 +78,7 @@ slap_op_free( Operation *op ) } op->o_groups = NULL; } +#endif #if defined( LDAP_SLAPI ) if ( op->o_pb != NULL ) { -- 2.39.5