diff options
-rw-r--r-- | src/libcharon/daemon.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/library.c | 3 | ||||
-rw-r--r-- | src/pluto/plutomain.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c index b8dc52a60..5b79aa303 100644 --- a/src/libcharon/daemon.c +++ b/src/libcharon/daemon.c @@ -115,6 +115,8 @@ static void destroy(private_daemon_t *this) DESTROY_IF(this->public.connect_manager); DESTROY_IF(this->public.mediation_manager); #endif /* ME */ + /* make sure the cache is clear before unloading plugins */ + lib->credmgr->flush_cache(lib->credmgr, CERT_ANY); /* unload plugins to release threads */ lib->plugins->unload(lib->plugins); #ifdef CAPABILITIES_LIBCAP diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c index 6ed4d1285..cd6a41f44 100644 --- a/src/libstrongswan/library.c +++ b/src/libstrongswan/library.c @@ -61,6 +61,9 @@ void library_deinit() detailed = lib->settings->get_bool(lib->settings, "libstrongswan.leak_detective.detailed", TRUE); + /* make sure the cache is clear before unloading plugins */ + lib->credmgr->flush_cache(lib->credmgr, CERT_ANY); + this->public.scheduler->destroy(this->public.scheduler); this->public.processor->destroy(this->public.processor); this->public.plugins->destroy(this->public.plugins); diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c index db5f2d941..2e046ec0b 100644 --- a/src/pluto/plutomain.c +++ b/src/pluto/plutomain.c @@ -852,6 +852,7 @@ void exit_pluto(int status) delete_lock(); options->destroy(options); pluto_deinit(); + lib->credmgr->flush_cache(lib->credmgr, CERT_ANY); lib->plugins->unload(lib->plugins); libhydra_deinit(); library_deinit(); |