From c57782ad66bb8278b6c002f8a25e1d2dd8410b43 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 29 Aug 2006 16:07:39 +0000 Subject: [PATCH] fix pre-allocated entry/attribute handling --- servers/slapd/overlays/accesslog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index f0a7d45d76..2ff33ddcc1 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -1476,6 +1476,7 @@ accesslog_db_open( if ( e ) { be_entry_release_rw( op, e, 0 ); + } else { SlapReply rs = {REP_RESULT}; struct berval rdn, nrdn, attr; @@ -1535,8 +1536,9 @@ accesslog_db_open( SLAP_DBFLAGS( op->o_bd ) |= SLAP_DBFLAG_NOLASTMOD; rc = op->o_bd->be_add( op, &rs ); SLAP_DBFLAGS( op->o_bd ) ^= SLAP_DBFLAG_NOLASTMOD; - attrs_free( e->e_attrs ); - ch_free( e ); + BER_BVZERO( &e->e_name ); + BER_BVZERO( &e->e_nname ); + entry_free( e ); } ldap_pvt_thread_pool_context_reset( thrctx ); return rc; -- 2.39.5