/* free cache write lock */
ldap_pvt_thread_rdwr_wunlock( &cache->c_rwlock );
bdb_cache_entryinfo_unlock( ei->bei_parent );
- bdb_cache_entryinfo_destroy( ei );
- e->e_private = NULL;
return( rc );
}
+void
+bdb_cache_delete_cleanup(
+ Entry *e
+)
+{
+ bdb_cache_entryinfo_destroy( e->e_private );
+ e->e_private = NULL;
+ bdb_entry_return( e );
+}
+
static int
bdb_cache_delete_internal(
Cache *cache,
#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
if ( rs->sr_err == LDAP_SUCCESS && !noop ) {
- BEI(e) = eip;
LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
}
- BEI(e) = NULL;
}
#endif
/* free entry */
if( e != NULL ) {
if ( rs->sr_err == LDAP_SUCCESS ) {
- bdb_entry_return( e );
+ /* Free the EntryInfo and the Entry */
+ bdb_cache_delete_cleanup( e );
} else {
bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e);
}
#define bdb_cache_add BDB_SYMBOL(cache_add)
#define bdb_cache_children BDB_SYMBOL(cache_children)
#define bdb_cache_delete BDB_SYMBOL(cache_delete)
+#define bdb_cache_delete_cleanup BDB_SYMBOL(cache_delete_cleanup)
#define bdb_cache_find_id BDB_SYMBOL(cache_find_id)
#define bdb_cache_find_ndn BDB_SYMBOL(cache_find_ndn)
#define bdb_cache_modify BDB_SYMBOL(cache_modify)
u_int32_t locker,
DB_LOCK *lock
);
+void bdb_cache_delete_cleanup(
+ Entry *e
+);
void bdb_cache_release_all( Cache *cache );
#ifdef BDB_REUSE_LOCKERS