mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Destroy Backend/Overlay after an error happend during one of the
config_parse_add() calls, as backend_db_init() might have been called.
This commit is contained in:
parent
3232686cc1
commit
7027609818
@ -3173,10 +3173,6 @@ ok:
|
||||
Debug(LDAP_DEBUG_ANY, "%s: %s (%s)!\n",
|
||||
ca->log, ca->msg, ca->argv[1] );
|
||||
rc = LDAP_OTHER;
|
||||
if ( colst[0]->co_type == Cft_Database )
|
||||
backend_destroy_one( ca->be );
|
||||
else
|
||||
overlay_destroy_one( ca->be, (slap_overinst *)ca->bi );
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
@ -3202,6 +3198,14 @@ ok:
|
||||
}
|
||||
|
||||
leave:
|
||||
if ( rc ) {
|
||||
if ( (colst[0]->co_type == Cft_Database) && ca->be ) {
|
||||
backend_destroy_one( ca->be );
|
||||
} else if ( (colst[0]->co_type == Cft_Database) && ca->bi ) {
|
||||
overlay_destroy_one( ca->be, (slap_overinst *)ca->bi );
|
||||
}
|
||||
}
|
||||
|
||||
ch_free( ca->argv );
|
||||
if ( colst ) ch_free( colst );
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user