From: Howard Chu Date: Thu, 4 Jan 2007 03:17:59 +0000 (+0000) Subject: Simpler fix X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~266 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f2acc11976d0d15c03f9a6b5bb13a8e150173d8b;p=openldap Simpler fix --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 8d8df564fd..c5572570d3 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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 */