From: Pierangelo Masarati Date: Tue, 29 Aug 2006 16:07:39 +0000 (+0000) Subject: fix pre-allocated entry/attribute handling X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~237 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c57782ad66bb8278b6c002f8a25e1d2dd8410b43;p=openldap fix pre-allocated entry/attribute handling --- 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;