Use tmpmem for group cache, doesn't need cleanup

This commit is contained in:
Howard Chu 2003-10-23 01:29:56 +00:00
parent 102d8159a7
commit 6ad5fd16ca
2 changed files with 3 additions and 1 deletions

View file

@ -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;

View file

@ -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 ) {