mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Simpler fix
This commit is contained in:
parent
831d1cccc7
commit
f2acc11976
@ -472,21 +472,19 @@ bdb_db_close( BackendDB *be )
|
||||
|
||||
bdb_cache_release_all (&bdb->bi_cache);
|
||||
|
||||
if ( bdb->bi_idl_cache_max_size ) {
|
||||
if ( bdb->bi_idl_cache_size ) {
|
||||
avl_free( bdb->bi_idl_tree, NULL );
|
||||
bdb->bi_idl_tree = NULL;
|
||||
if ( bdb->bi_idl_lru_head ) {
|
||||
entry = bdb->bi_idl_lru_head;
|
||||
do {
|
||||
next_entry = entry->idl_lru_next;
|
||||
if ( entry->idl )
|
||||
free( entry->idl );
|
||||
free( entry->kstr.bv_val );
|
||||
free( entry );
|
||||
entry = next_entry;
|
||||
} while ( entry != bdb->bi_idl_lru_head );
|
||||
bdb->bi_idl_lru_head = bdb->bi_idl_lru_tail = NULL;
|
||||
}
|
||||
entry = bdb->bi_idl_lru_head;
|
||||
do {
|
||||
next_entry = entry->idl_lru_next;
|
||||
if ( entry->idl )
|
||||
free( entry->idl );
|
||||
free( entry->kstr.bv_val );
|
||||
free( entry );
|
||||
entry = next_entry;
|
||||
} while ( entry != bdb->bi_idl_lru_head );
|
||||
bdb->bi_idl_lru_head = bdb->bi_idl_lru_tail = NULL;
|
||||
}
|
||||
|
||||
/* close db environment */
|
||||
|
Loading…
Reference in New Issue
Block a user