mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
Must close env before removing it.
This commit is contained in:
parent
76c9a89510
commit
143a1cdae1
@ -278,6 +278,15 @@ bdb_db_open( BackendDB *be )
|
|||||||
}
|
}
|
||||||
/* Prev environment had TXN support, get rid of it */
|
/* Prev environment had TXN support, get rid of it */
|
||||||
if ( !flags_ok ) {
|
if ( !flags_ok ) {
|
||||||
|
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,
|
||||||
|
"bdb_db_open: db_env_create failed: %s (%d)\n",
|
||||||
|
db_strerror(rc), rc, 0 );
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
bdb->bi_dbenv->remove( bdb->bi_dbenv, dbhome, 0 );
|
bdb->bi_dbenv->remove( bdb->bi_dbenv, dbhome, 0 );
|
||||||
bdb->bi_dbenv = NULL;
|
bdb->bi_dbenv = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user