mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Don't access entry after commit; it may be gone if the cache is full
This commit is contained in:
parent
96bfc8ec92
commit
501f749c05
@ -36,6 +36,7 @@ bdb_delete( Operation *op, SlapReply *rs )
|
||||
AttributeDescription *entry = slap_schema.si_ad_entry;
|
||||
DB_TXN *ltid = NULL, *lt2;
|
||||
struct bdb_op_info opinfo;
|
||||
ID eid;
|
||||
|
||||
u_int32_t locker = 0;
|
||||
DB_LOCK lock, plock;
|
||||
@ -458,6 +459,8 @@ retry: /* transaction retry */
|
||||
goto return_results;
|
||||
}
|
||||
|
||||
eid = e->e_id;
|
||||
|
||||
#if 0 /* Do we want to reclaim deleted IDs? */
|
||||
ldap_pvt_thread_mutex_lock( &bdb->bi_lastid_mutex );
|
||||
if ( e->e_id == bdb->bi_lastid ) {
|
||||
@ -545,7 +548,7 @@ retry: /* transaction retry */
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"bdb_delete: deleted%s id=%08lx dn=\"%s\"\n",
|
||||
op->o_noop ? " (no-op)" : "",
|
||||
e->e_id, e->e_dn );
|
||||
eid, op->o_req_dn.bv_val );
|
||||
rs->sr_err = LDAP_SUCCESS;
|
||||
rs->sr_text = NULL;
|
||||
if( num_ctrls ) rs->sr_ctrls = ctrls;
|
||||
|
@ -626,7 +626,7 @@ retry: /* transaction retry */
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"bdb_modify: updated%s id=%08lx dn=\"%s\"\n",
|
||||
op->o_noop ? " (no-op)" : "",
|
||||
e->e_id, e->e_dn );
|
||||
dummy.e_id, op->o_req_dn.bv_val );
|
||||
|
||||
rs->sr_err = LDAP_SUCCESS;
|
||||
rs->sr_text = NULL;
|
||||
|
@ -866,7 +866,7 @@ retry: /* transaction retry */
|
||||
op->o_private = NULL;
|
||||
|
||||
if( rs->sr_err != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "bdb_add: %s : %s (%d)\n",
|
||||
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: %s : %s (%d)\n",
|
||||
rs->sr_text, db_strerror(rs->sr_err), rs->sr_err );
|
||||
rs->sr_err = LDAP_OTHER;
|
||||
|
||||
@ -876,7 +876,7 @@ retry: /* transaction retry */
|
||||
Debug(LDAP_DEBUG_TRACE,
|
||||
"bdb_modrdn: rdn modified%s id=%08lx dn=\"%s\"\n",
|
||||
op->o_noop ? " (no-op)" : "",
|
||||
e->e_id, e->e_dn );
|
||||
dummy.e_id, op->o_req_dn.bv_val );
|
||||
rs->sr_text = NULL;
|
||||
if( num_ctrls ) rs->sr_ctrls = ctrls;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user