Simpler fix

This commit is contained in:
Howard Chu 2007-01-04 03:17:59 +00:00
parent 831d1cccc7
commit f2acc11976

View File

@ -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 */