]> git.sur5r.net Git - openldap/commitdiff
Use tmpmem for group cache, doesn't need cleanup
authorHoward Chu <hyc@openldap.org>
Thu, 23 Oct 2003 01:29:56 +0000 (01:29 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 23 Oct 2003 01:29:56 +0000 (01:29 +0000)
servers/slapd/backend.c
servers/slapd/operation.c

index 1ee3375a489d24f1882d3d2053740d47663f69e2..009a8855d1e744ed6cd0b65f43692fbb0759118a 100644 (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;
index 1d00fc625f7ac7ea6875acf2beea6e3b146ac29e..2941bc03017d023bcf34c949c724eb2a62dad9c8 100644 (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 ) {