charon-cmd: Register atexit() handler for libcharon_deinit twice

Similar to cbe9e575ee, this avoids issues with libraries that are
pulled in via plugins and register their own atexit() handlers.
This commit is contained in:
Tobias Brunner
2018-12-07 10:30:08 +01:00
parent 10f8834bf9
commit 157150ca91
+3
View File
@@ -348,6 +348,9 @@ int main(int argc, char *argv[])
{
exit(SS_RC_INITIALIZATION_FAILED);
}
/* register this again after loading plugins to avoid issues with libraries
* that register atexit() handlers */
atexit(libcharon_deinit);
if (!lib->caps->drop(lib->caps))
{
exit(SS_RC_INITIALIZATION_FAILED);