mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
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:
parent
4362654eb6
commit
ca7ba1a3fd
@ -252,13 +252,15 @@ 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 */
|
||||||
rc = bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
|
if( bdb->bi_dbenv ) {
|
||||||
bdb->bi_dbenv = NULL;
|
rc = bdb->bi_dbenv->close( bdb->bi_dbenv, 0 );
|
||||||
if( rc != 0 ) {
|
bdb->bi_dbenv = NULL;
|
||||||
Debug( LDAP_DEBUG_ANY,
|
if( rc != 0 ) {
|
||||||
"bdb_db_destroy: close failed: %s (%d)\n",
|
Debug( LDAP_DEBUG_ANY,
|
||||||
db_strerror(rc), rc, 0 );
|
"bdb_db_destroy: close failed: %s (%d)\n",
|
||||||
return rc;
|
db_strerror(rc), rc, 0 );
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user