Fix slapadd crash when only a subset of databases have been initialized.

Likely should have a general solution to this.
This commit is contained in:
Kurt Zeilenga 2001-07-31 00:16:44 +00:00
parent 4362654eb6
commit ca7ba1a3fd

View File

@ -252,6 +252,7 @@ bdb_db_destroy( BackendDB *be )
struct bdb_info *bdb = (struct bdb_info *) be->be_private; struct bdb_info *bdb = (struct bdb_info *) be->be_private;
/* close db environment */ /* close db environment */
if( bdb->bi_dbenv ) {
rc = bdb->bi_dbenv->close( bdb->bi_dbenv, 0 ); rc = bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
bdb->bi_dbenv = NULL; bdb->bi_dbenv = NULL;
if( rc != 0 ) { if( rc != 0 ) {
@ -260,6 +261,7 @@ bdb_db_destroy( BackendDB *be )
db_strerror(rc), rc, 0 ); db_strerror(rc), rc, 0 );
return rc; return rc;
} }
}
return 0; return 0;
} }