]> git.sur5r.net Git - openldap/commitdiff
Simpler fix
authorHoward Chu <hyc@openldap.org>
Thu, 4 Jan 2007 03:17:59 +0000 (03:17 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 4 Jan 2007 03:17:59 +0000 (03:17 +0000)
servers/slapd/back-bdb/init.c

index 8d8df564fd320bc5ae8c094c82831565462483a6..c5572570d3f64cc8492a171b57a4d70c687604fb 100644 (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 */