Make sure the certificate cache is flushed when plugins are unloaded.

This avoids segmentation faults when plugins implementing cert_t are
already unloaded when the cache is flushed during destruction.
This commit is contained in:
Tobias Brunner committed 2011-12-15 12:20:09 +01:00
1 parent 49b44c98c1
commit a5951a2861
3 files changed
+6

No files matched your search

+2
View File
@@ -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