ITS#3992 check bi_dbenv

This commit is contained in:
Howard Chu 2005-09-01 12:15:30 +00:00
parent a6af143798
commit 8eed3a4bb5

View File

@ -312,8 +312,10 @@ bdb_db_open( BackendDB *be )
open_env = 0;
} else {
/* Create a new env that can take the desired settings */
bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
bdb->bi_dbenv = NULL;
if ( bdb->bi_dbenv != NULL ) {
bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
bdb->bi_dbenv = NULL;
}
rc = db_env_create( &bdb->bi_dbenv, 0 );
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,