return rc;
}
+static BackendDB *configDB; /* only set by slapadd */
+
/* Parse an LDAP entry into config directives */
static int
config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
done:
if ( rc ) {
if ( (coptr->co_type == Cft_Database) && ca->be ) {
- if ( ca->be != frontendDB )
+ if ( ca->be != frontendDB && ca->be != configDB )
backend_destroy_one( ca->be, 1 );
} else if ( (coptr->co_type == Cft_Overlay) && ca->bi ) {
overlay_destroy_one( ca->be, (slap_overinst *)ca->bi );
CfBackInfo *cfb = be->be_private;
BackendInfo *bi = cfb->cb_db.bd_info;
+ configDB = be;
if ( bi && bi->bi_tool_entry_open )
return bi->bi_tool_entry_open( &cfb->cb_db, mode );
else