Commit 70276098 authored by Ralf Haferkamp's avatar Ralf Haferkamp
Browse files

Destroy Backend/Overlay after an error happend during one of the

config_parse_add() calls, as backend_db_init() might have been called.
parent 3232686c
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment