More cleanup for bdb_db_close

This commit is contained in:
Howard Chu 2001-12-15 08:11:59 +00:00
parent dfd26b8d95
commit 335294e190

View File

@ -317,11 +317,17 @@ bdb_db_close( BackendDB *be )
{ {
int rc; int rc;
struct bdb_info *bdb = (struct bdb_info *) be->be_private; struct bdb_info *bdb = (struct bdb_info *) be->be_private;
struct bdb_db_info *db;
while( bdb->bi_ndatabases-- ) { while( bdb->bi_ndatabases-- ) {
rc = bdb->bi_databases[bdb->bi_ndatabases]->bdi_db->close( db = bdb->bi_databases[bdb->bi_ndatabases];
bdb->bi_databases[bdb->bi_ndatabases]->bdi_db, 0 ); rc = db->bdi_db->close( db->bdi_db, 0 );
if( db->bdi_name )
free( db->bdi_name );
free( db );
} }
free( bdb->bi_databases );
bdb_attr_index_destroy( bdb->bi_attrs );
return 0; return 0;
} }